More fixups, removing chestgenstuff aggressively. Use loot tables. Any missing ones WILL be added by Mojang.

This commit is contained in:
cpw 2016-03-08 23:22:54 -05:00
parent a44d76652b
commit 25256c8ddd
6 changed files with 13 additions and 33 deletions

View File

@ -57,7 +57,7 @@
Vec3d vec3d1 = vec3d.addVector((double)f6 * d3, (double)f5 * d3, (double)f7 * d3);
return worldIn.rayTraceBlocks(vec3d, vec3d1, useLiquids, !useLiquids, false);
}
@@ -422,11 +431,609 @@
@@ -422,11 +431,588 @@
return false;
}
@ -96,7 +96,7 @@
+ * by a user in the displayed name, such as a mode of operation.
+ *
+ * @param item the ItemStack for the item.
+ * @param the name that will be displayed unless it is changed in this method.
+ * @param displayName the name that will be displayed unless it is changed in this method.
+ */
+ public String getHighlightTip( ItemStack item, String displayName )
+ {
@ -283,27 +283,6 @@
+ }
+
+ /**
+ * Generates the base Random item for a specific instance of the chest gen,
+ * Enchanted books use this to pick a random enchantment.
+ *
+ * @param chest The chest category to generate for
+ * @param rnd World RNG
+ * @param original Original result registered with the chest gen hooks.
+ * @return New values to use as the random item, typically this will be original
+ */
+ @Deprecated // LootTables!
+ public net.minecraft.util.WeightedRandomChestContent getChestGenBase(net.minecraftforge.common.ChestGenHooks chest, Random rnd, net.minecraft.util.WeightedRandomChestContent original)
+ {
+ if (this instanceof ItemEnchantedBook)
+ {
+ return ((ItemEnchantedBook)this).getRandom(rnd,
+ original.minStackSize,
+ original.maxStackSize, original.itemWeight);
+ }
+ return original;
+ }
+
+ /**
+ *
+ * Should this item, when held, allow sneak-clicks to pass through to the underlying block?
+ *
@ -500,7 +479,7 @@
+ }
+
+ /**
+ * ItemStack sensitive version of {@link #canHarvestBlock(Block)}
+ * ItemStack sensitive version of {@link #canHarvestBlock(IBlockState)}
+ * @param state The block trying to harvest
+ * @param stack The itemstack used to harvest the block
+ * @return true if can harvest the block
@ -515,7 +494,7 @@
+ * This is a ItemStack (and thus NBT) sensitive version of Item.getItemStackLimit()
+ *
+ * @param stack The ItemStack
+ * @return THe maximum number this item can be stacked to
+ * @return The maximum number this item can be stacked to
+ */
+ public int getItemStackLimit(ItemStack stack)
+ {
@ -667,7 +646,7 @@
public static void registerItems()
{
registerItemBlock(Blocks.stone, (new ItemMultiTexture(Blocks.stone, Blocks.stone, new Function<ItemStack, String>()
@@ -935,6 +1542,10 @@
@@ -935,6 +1521,10 @@
private final float damageVsEntity;
private final int enchantability;
@ -678,7 +657,7 @@
private ToolMaterial(int harvestLevel, int maxUses, float efficiency, float damageVsEntity, int enchantability)
{
this.harvestLevel = harvestLevel;
@@ -969,9 +1580,36 @@
@@ -969,9 +1559,36 @@
return this.enchantability;
}

View File

@ -69,7 +69,7 @@
+ ret = this.json;
+ if (ret == null)
+ {
+ ret = net.minecraft.network.status.server.S00PacketServerInfo.GSON.toJson(this);
+ ret = net.minecraft.network.status.server.SPacketServerInfo.GSON.toJson(this);
+ this.json = ret;
+ }
+ mutex.release();

View File

@ -103,7 +103,7 @@
{
i = 8;
+ //Keeping here as a note for future when it may be restored.
+ boolean isForced = getPersistentChunks().containsKey(new ChunkCoordIntPair(nextticklistentry.position.getX() >> 4, nextticklistentry.position.getZ() >> 4));
+ boolean isForced = getPersistentChunks().containsKey(new ChunkCoordIntPair(pos.getX() >> 4, pos.getZ() >> 4));
+ i = isForced ? 0 : 8;
if (this.isAreaLoaded(pos.add(-i, -i, -i), pos.add(i, i, i)))
@ -241,7 +241,7 @@
+ public java.io.File getChunkSaveLocation()
+ {
+ return ((net.minecraft.world.chunk.storage.AnvilChunkLoader)theChunkProviderServer.chunkLoader).chunkSaveLocation;
+ return ((net.minecraft.world.chunk.storage.AnvilChunkLoader)getChunkProvider().chunkLoader).chunkSaveLocation;
+ }
+
static class ServerBlockEventList extends ArrayList<BlockEventData>

View File

@ -14,6 +14,7 @@ import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
import net.minecraft.client.renderer.block.model.ItemOverride;
import net.minecraft.client.renderer.block.model.ItemOverrideList;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
@ -228,7 +229,7 @@ public class ModelDynBucket implements IModel, IModelCustomData, IRetexturableMo
public static final BakedDynBucketOverrideHandler INSTANCE = new BakedDynBucketOverrideHandler();
private BakedDynBucketOverrideHandler()
{
super(ImmutableList.of());
super(ImmutableList.<ItemOverride>of());
}
@Override

View File

@ -690,7 +690,7 @@ public class ForgeHooks
if (event.isCanceled())
{
// Let the client know the block still exists
entityPlayer.playerNetServerHandler.sendPacket(new S23PacketBlockChange(world, pos));
entityPlayer.playerNetServerHandler.sendPacket(new SPacketBlockChange(world, pos));
// Update any tile entity data for this block
TileEntity tileentity = world.getTileEntity(pos);

View File

@ -150,7 +150,7 @@ public net.minecraft.client.renderer.VertexBuffer func_178972_a(IIIII)V # putCol
#public net.minecraft.client.renderer.entity.RenderLivingBase func_177094_a(Lnet/minecraft/client/renderer/entity/layers/LayerRenderer;)Z # addLayer
# S00PacketServerInfo
#public net.minecraft.network.status.server.S00PacketServerInfo field_149297_a # GSON
public net.minecraft.network.status.server.SPacketServerInfo field_149297_a # GSON
#Main FML Access Transformer configuration file
# TileEntity addMapping