Fix BrewingStands Removing NBT / Potions
Dieser Commit ist enthalten in:
Ursprung
65e0f8e01f
Commit
536ed49937
@ -1,9 +1,124 @@
|
||||
From 622fdf26e1855df13627894f8a637ff21ca8dd12 Mon Sep 17 00:00:00 2001
|
||||
From 5b899e58bba86e41281992f8eed8b9a93f5405a6 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 2 Jul 2013 13:13:29 +1000
|
||||
Subject: [PATCH] mc-dev imports
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockBrewingStand.java b/src/main/java/net/minecraft/server/BlockBrewingStand.java
|
||||
new file mode 100644
|
||||
index 0000000..270b2cb
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/BlockBrewingStand.java
|
||||
@@ -0,0 +1,109 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.util.List;
|
||||
+import java.util.Random;
|
||||
+
|
||||
+public class BlockBrewingStand extends BlockContainer {
|
||||
+
|
||||
+ private Random a = new Random();
|
||||
+
|
||||
+ public BlockBrewingStand(int i) {
|
||||
+ super(i, Material.ORE);
|
||||
+ }
|
||||
+
|
||||
+ public boolean c() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public int d() {
|
||||
+ return 25;
|
||||
+ }
|
||||
+
|
||||
+ public TileEntity b(World world) {
|
||||
+ return new TileEntityBrewingStand();
|
||||
+ }
|
||||
+
|
||||
+ public boolean b() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public void a(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, List list, Entity entity) {
|
||||
+ this.a(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.875F, 0.5625F);
|
||||
+ super.a(world, i, j, k, axisalignedbb, list, entity);
|
||||
+ this.g();
|
||||
+ super.a(world, i, j, k, axisalignedbb, list, entity);
|
||||
+ }
|
||||
+
|
||||
+ public void g() {
|
||||
+ this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
|
||||
+ }
|
||||
+
|
||||
+ public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) {
|
||||
+ if (world.isStatic) {
|
||||
+ return true;
|
||||
+ } else {
|
||||
+ TileEntityBrewingStand tileentitybrewingstand = (TileEntityBrewingStand) world.getTileEntity(i, j, k);
|
||||
+
|
||||
+ if (tileentitybrewingstand != null) {
|
||||
+ entityhuman.openBrewingStand(tileentitybrewingstand);
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void postPlace(World world, int i, int j, int k, EntityLiving entityliving, ItemStack itemstack) {
|
||||
+ if (itemstack.hasName()) {
|
||||
+ ((TileEntityBrewingStand) world.getTileEntity(i, j, k)).a(itemstack.getName());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void remove(World world, int i, int j, int k, int l, int i1) {
|
||||
+ TileEntity tileentity = world.getTileEntity(i, j, k);
|
||||
+
|
||||
+ if (tileentity instanceof TileEntityBrewingStand) {
|
||||
+ TileEntityBrewingStand tileentitybrewingstand = (TileEntityBrewingStand) tileentity;
|
||||
+
|
||||
+ for (int j1 = 0; j1 < tileentitybrewingstand.getSize(); ++j1) {
|
||||
+ ItemStack itemstack = tileentitybrewingstand.getItem(j1);
|
||||
+
|
||||
+ if (itemstack != null) {
|
||||
+ float f = this.a.nextFloat() * 0.8F + 0.1F;
|
||||
+ float f1 = this.a.nextFloat() * 0.8F + 0.1F;
|
||||
+ float f2 = this.a.nextFloat() * 0.8F + 0.1F;
|
||||
+
|
||||
+ while (itemstack.count > 0) {
|
||||
+ int k1 = this.a.nextInt(21) + 10;
|
||||
+
|
||||
+ if (k1 > itemstack.count) {
|
||||
+ k1 = itemstack.count;
|
||||
+ }
|
||||
+
|
||||
+ itemstack.count -= k1;
|
||||
+ EntityItem entityitem = new EntityItem(world, (double) ((float) i + f), (double) ((float) j + f1), (double) ((float) k + f2), new ItemStack(itemstack.id, k1, itemstack.getData()));
|
||||
+ float f3 = 0.05F;
|
||||
+
|
||||
+ entityitem.motX = (double) ((float) this.a.nextGaussian() * f3);
|
||||
+ entityitem.motY = (double) ((float) this.a.nextGaussian() * f3 + 0.2F);
|
||||
+ entityitem.motZ = (double) ((float) this.a.nextGaussian() * f3);
|
||||
+ world.addEntity(entityitem);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ super.remove(world, i, j, k, l, i1);
|
||||
+ }
|
||||
+
|
||||
+ public int getDropType(int i, Random random, int j) {
|
||||
+ return Item.BREWING_STAND.id;
|
||||
+ }
|
||||
+
|
||||
+ public boolean q_() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public int b_(World world, int i, int j, int k, int l) {
|
||||
+ return Container.b((IInventory) world.getTileEntity(i, j, k));
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||
new file mode 100644
|
||||
index 0000000..9acd4f2
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 1bae811fba2af5397d2702480779e29089ff37a9 Mon Sep 17 00:00:00 2001
|
||||
From 1119047fd58285bfcb93716e2a53f418a82323bf Mon Sep 17 00:00:00 2001
|
||||
From: mrapple <tony@oc.tc>
|
||||
Date: Tue, 1 Oct 2013 21:10:50 -0500
|
||||
Subject: [PATCH] Fix clearing potion effects on respawn -- missed rename
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index fd49c80..54dad5c 100644
|
||||
index 6c55250..d84c1be 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -968,7 +968,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -958,7 +958,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.expTotal = this.newTotalExp;
|
||||
this.exp = 0;
|
||||
this.deathTicks = 0;
|
||||
@ -18,5 +18,5 @@ index fd49c80..54dad5c 100644
|
||||
this.activeContainer = this.defaultContainer;
|
||||
this.killer = null;
|
||||
--
|
||||
1.7.12.4 (Apple Git-37)
|
||||
1.8.1.2
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 82db8f98979f0c9970b19711f5a939b6f07a67a8 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Wed, 9 Oct 2013 18:20:05 +1100
|
||||
Subject: [PATCH] Fix BrewingStands Removing NBT / Potions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockBrewingStand.java b/src/main/java/net/minecraft/server/BlockBrewingStand.java
|
||||
index 270b2cb..308207a 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockBrewingStand.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockBrewingStand.java
|
||||
@@ -86,7 +86,13 @@ public class BlockBrewingStand extends BlockContainer {
|
||||
entityitem.motX = (double) ((float) this.a.nextGaussian() * f3);
|
||||
entityitem.motY = (double) ((float) this.a.nextGaussian() * f3 + 0.2F);
|
||||
entityitem.motZ = (double) ((float) this.a.nextGaussian() * f3);
|
||||
- world.addEntity(entityitem);
|
||||
+ // Spigot Start
|
||||
+ if ( itemstack.hasTag() )
|
||||
+ {
|
||||
+ entityitem.getItemStack().setTag( (NBTTagCompound) itemstack.getTag().clone() );
|
||||
+ }
|
||||
+ // Spigot End
|
||||
+ world.addEntity( entityitem );
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
1.8.1.2
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren