| 1 | package net.minecraft.client.renderer.entity;
|
| 2 |
|
| 3 | import java.util.List;
|
| 4 | import java.util.concurrent.Callable;
|
| 5 | import net.minecraft.block.Block;
|
| 6 | import net.minecraft.block.BlockDirt;
|
| 7 | import net.minecraft.block.BlockDoublePlant;
|
| 8 | import net.minecraft.block.BlockFlower;
|
| 9 | import net.minecraft.block.BlockHugeMushroom;
|
| 10 | import net.minecraft.block.BlockPlanks;
|
| 11 | import net.minecraft.block.BlockPrismarine;
|
| 12 | import net.minecraft.block.BlockQuartz;
|
| 13 | import net.minecraft.block.BlockRedSandstone;
|
| 14 | import net.minecraft.block.BlockSand;
|
| 15 | import net.minecraft.block.BlockSandStone;
|
| 16 | import net.minecraft.block.BlockSilverfish;
|
| 17 | import net.minecraft.block.BlockStone;
|
| 18 | import net.minecraft.block.BlockStoneBrick;
|
| 19 | import net.minecraft.block.BlockStoneSlab;
|
| 20 | import net.minecraft.block.BlockStoneSlabNew;
|
| 21 | import net.minecraft.block.BlockTallGrass;
|
| 22 | import net.minecraft.block.BlockWall;
|
| 23 | import net.minecraft.client.Minecraft;
|
| 24 | import net.minecraft.client.gui.FontRenderer;
|
| 25 | import net.minecraft.client.renderer.EntityRenderer;
|
| 26 | import net.minecraft.client.renderer.GlStateManager;
|
| 27 | import net.minecraft.client.renderer.ItemMeshDefinition;
|
| 28 | import net.minecraft.client.renderer.ItemModelMesher;
|
| 29 | import net.minecraft.client.renderer.Tessellator;
|
| 30 | import net.minecraft.client.renderer.WorldRenderer;
|
| 31 | import net.minecraft.client.renderer.block.model.BakedQuad;
|
| 32 | import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
| 33 | import net.minecraft.client.renderer.block.model.ItemTransformVec3f;
|
| 34 | import net.minecraft.client.renderer.texture.TextureManager;
|
| 35 | import net.minecraft.client.renderer.texture.TextureMap;
|
| 36 | import net.minecraft.client.renderer.texture.TextureUtil;
|
| 37 | import net.minecraft.client.renderer.tileentity.TileEntityItemStackRenderer;
|
| 38 | import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
| 39 | import net.minecraft.client.resources.IResourceManager;
|
| 40 | import net.minecraft.client.resources.IResourceManagerReloadListener;
|
| 41 | import net.minecraft.client.resources.model.IBakedModel;
|
| 42 | import net.minecraft.client.resources.model.ModelManager;
|
| 43 | import net.minecraft.client.resources.model.ModelResourceLocation;
|
| 44 | import net.minecraft.crash.CrashReport;
|
| 45 | import net.minecraft.crash.CrashReportCategory;
|
| 46 | import net.minecraft.entity.EntityLivingBase;
|
| 47 | import net.minecraft.entity.player.EntityPlayer;
|
| 48 | import net.minecraft.init.Blocks;
|
| 49 | import net.minecraft.init.Items;
|
| 50 | import net.minecraft.item.EnumDyeColor;
|
| 51 | import net.minecraft.item.Item;
|
| 52 | import net.minecraft.item.ItemFishFood;
|
| 53 | import net.minecraft.item.ItemPotion;
|
| 54 | import net.minecraft.item.ItemStack;
|
| 55 | import net.minecraft.util.EnumChatFormatting;
|
| 56 | import net.minecraft.util.EnumFacing;
|
| 57 | import net.minecraft.util.ReportedException;
|
| 58 | import net.minecraft.util.ResourceLocation;
|
| 59 | import net.minecraft.util.Vec3i;
|
| 60 |
|
| 61 | public class RenderItem implements IResourceManagerReloadListener
|
| 62 | {
|
| 63 | private static final ResourceLocation RES_ITEM_GLINT = new ResourceLocation("textures/misc/enchanted_item_glint.png");
|
| 64 |
|
| 65 | /** False when the renderer is rendering the item's effects into a GUI */
|
| 66 | private boolean notRenderingEffectsInGUI = true;
|
| 67 |
|
| 68 | /** Defines the zLevel of rendering of item on GUI. */
|
| 69 | public float zLevel;
|
| 70 | private final ItemModelMesher itemModelMesher;
|
| 71 | private final TextureManager textureManager;
|
| 72 |
|
| 73 | public RenderItem(TextureManager textureManager, ModelManager modelManager)
|
| 74 | {
|
| 75 | this.textureManager = textureManager;
|
| 76 | this.itemModelMesher = new ItemModelMesher(modelManager);
|
| 77 | this.registerItems();
|
| 78 | }
|
| 79 |
|
| 80 | /**
|
| 81 | * False when the renderer is rendering the item's effects into a GUI
|
| 82 | *
|
| 83 | * @param isNot If the renderer is not rendering the effects in a GUI
|
| 84 | */
|
| 85 | public void isNotRenderingEffectsInGUI(boolean isNot)
|
| 86 | {
|
| 87 | this.notRenderingEffectsInGUI = isNot;
|
| 88 | }
|
| 89 |
|
| 90 | public ItemModelMesher getItemModelMesher()
|
| 91 | {
|
| 92 | return this.itemModelMesher;
|
| 93 | }
|
| 94 |
|
| 95 | protected void registerItem(Item itm, int subType, String identifier)
|
| 96 | {
|
| 97 | this.itemModelMesher.register(itm, subType, new ModelResourceLocation(identifier, "inventory"));
|
| 98 | }
|
| 99 |
|
| 100 | protected void registerBlock(Block blk, int subType, String identifier)
|
| 101 | {
|
| 102 | this.registerItem(Item.getItemFromBlock(blk), subType, identifier);
|
| 103 | }
|
| 104 |
|
| 105 | private void registerBlock(Block blk, String identifier)
|
| 106 | {
|
| 107 | this.registerBlock(blk, 0, identifier);
|
| 108 | }
|
| 109 |
|
| 110 | private void registerItem(Item itm, String identifier)
|
| 111 | {
|
| 112 | this.registerItem(itm, 0, identifier);
|
| 113 | }
|
| 114 |
|
| 115 | private void renderModel(IBakedModel model, ItemStack stack)
|
| 116 | {
|
| 117 | this.renderModel(model, -1, stack);
|
| 118 | }
|
| 119 |
|
| 120 | private void renderModel(IBakedModel model, int color)
|
| 121 | {
|
| 122 | this.renderModel(model, color, (ItemStack)null);
|
| 123 | }
|
| 124 |
|
| 125 | private void renderModel(IBakedModel model, int color, ItemStack stack)
|
| 126 | {
|
| 127 | Tessellator tessellator = Tessellator.getInstance();
|
| 128 | WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
| 129 | worldrenderer.begin(7, DefaultVertexFormats.ITEM);
|
| 130 |
|
| 131 | for (EnumFacing enumfacing : EnumFacing.values())
|
| 132 | {
|
| 133 | this.renderQuads(worldrenderer, model.getFaceQuads(enumfacing), color, stack);
|
| 134 | }
|
| 135 |
|
| 136 | this.renderQuads(worldrenderer, model.getGeneralQuads(), color, stack);
|
| 137 | tessellator.draw();
|
| 138 | }
|
| 139 |
|
| 140 | public void renderItem(ItemStack stack, IBakedModel model)
|
| 141 | {
|
| 142 | if (stack != null)
|
| 143 | {
|
| 144 | GlStateManager.pushMatrix();
|
| 145 | GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
| 146 |
|
| 147 | if (model.isBuiltInRenderer())
|
| 148 | {
|
| 149 | GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
|
| 150 | GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
| 151 | GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
| 152 | GlStateManager.enableRescaleNormal();
|
| 153 | TileEntityItemStackRenderer.instance.renderByItem(stack);
|
| 154 | }
|
| 155 | else
|
| 156 | {
|
| 157 | GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
| 158 | this.renderModel(model, stack);
|
| 159 |
|
| 160 | if (stack.hasEffect())
|
| 161 | {
|
| 162 | this.renderEffect(model);
|
| 163 | }
|
| 164 | }
|
| 165 |
|
| 166 | GlStateManager.popMatrix();
|
| 167 | }
|
| 168 | }
|
| 169 |
|
| 170 | private void renderEffect(IBakedModel model)
|
| 171 | {
|
| 172 | GlStateManager.depthMask(false);
|
| 173 | GlStateManager.depthFunc(514);
|
| 174 | GlStateManager.disableLighting();
|
| 175 | GlStateManager.blendFunc(768, 1);
|
| 176 | this.textureManager.bindTexture(RES_ITEM_GLINT);
|
| 177 | GlStateManager.matrixMode(5890);
|
| 178 | GlStateManager.pushMatrix();
|
| 179 | GlStateManager.scale(8.0F, 8.0F, 8.0F);
|
| 180 | float f = (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F;
|
| 181 | GlStateManager.translate(f, 0.0F, 0.0F);
|
| 182 | GlStateManager.rotate(-50.0F, 0.0F, 0.0F, 1.0F);
|
| 183 | this.renderModel(model, -8372020);
|
| 184 | GlStateManager.popMatrix();
|
| 185 | GlStateManager.pushMatrix();
|
| 186 | GlStateManager.scale(8.0F, 8.0F, 8.0F);
|
| 187 | float f1 = (float)(Minecraft.getSystemTime() % 4873L) / 4873.0F / 8.0F;
|
| 188 | GlStateManager.translate(-f1, 0.0F, 0.0F);
|
| 189 | GlStateManager.rotate(10.0F, 0.0F, 0.0F, 1.0F);
|
| 190 | this.renderModel(model, -8372020);
|
| 191 | GlStateManager.popMatrix();
|
| 192 | GlStateManager.matrixMode(5888);
|
| 193 | GlStateManager.blendFunc(770, 771);
|
| 194 | GlStateManager.enableLighting();
|
| 195 | GlStateManager.depthFunc(515);
|
| 196 | GlStateManager.depthMask(true);
|
| 197 | this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
| 198 | }
|
| 199 |
|
| 200 | private void putQuadNormal(WorldRenderer renderer, BakedQuad quad)
|
| 201 | {
|
| 202 | Vec3i vec3i = quad.getFace().getDirectionVec();
|
| 203 | renderer.putNormal((float)vec3i.getX(), (float)vec3i.getY(), (float)vec3i.getZ());
|
| 204 | }
|
| 205 |
|
| 206 | private void renderQuad(WorldRenderer renderer, BakedQuad quad, int color)
|
| 207 | {
|
| 208 | renderer.addVertexData(quad.getVertexData());
|
| 209 | renderer.putColor4(color);
|
| 210 | this.putQuadNormal(renderer, quad);
|
| 211 | }
|
| 212 |
|
| 213 | private void renderQuads(WorldRenderer renderer, List<BakedQuad> quads, int color, ItemStack stack)
|
| 214 | {
|
| 215 | boolean flag = color == -1 && stack != null;
|
| 216 | int i = 0;
|
| 217 |
|
| 218 | for (int j = quads.size(); i < j; ++i)
|
| 219 | {
|
| 220 | BakedQuad bakedquad = (BakedQuad)quads.get(i);
|
| 221 | int k = color;
|
| 222 |
|
| 223 | if (flag && bakedquad.hasTintIndex())
|
| 224 | {
|
| 225 | k = stack.getItem().getColorFromItemStack(stack, bakedquad.getTintIndex());
|
| 226 |
|
| 227 | if (EntityRenderer.anaglyphEnable)
|
| 228 | {
|
| 229 | k = TextureUtil.anaglyphColor(k);
|
| 230 | }
|
| 231 |
|
| 232 | k = k | -16777216;
|
| 233 | }
|
| 234 |
|
| 235 | this.renderQuad(renderer, bakedquad, k);
|
| 236 | }
|
| 237 | }
|
| 238 |
|
| 239 | public boolean shouldRenderItemIn3D(ItemStack stack)
|
| 240 | {
|
| 241 | IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack);
|
| 242 | return ibakedmodel == null ? false : ibakedmodel.isGui3d();
|
| 243 | }
|
| 244 |
|
| 245 | private void preTransform(ItemStack stack)
|
| 246 | {
|
| 247 | IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack);
|
| 248 | Item item = stack.getItem();
|
| 249 |
|
| 250 | if (item != null)
|
| 251 | {
|
| 252 | boolean flag = ibakedmodel.isGui3d();
|
| 253 |
|
| 254 | if (!flag)
|
| 255 | {
|
| 256 | GlStateManager.scale(2.0F, 2.0F, 2.0F);
|
| 257 | }
|
| 258 |
|
| 259 | GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
| 260 | }
|
| 261 | }
|
| 262 |
|
| 263 | public void renderItem(ItemStack stack, ItemCameraTransforms.TransformType cameraTransformType)
|
| 264 | {
|
| 265 | if (stack != null)
|
| 266 | {
|
| 267 | IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack);
|
| 268 | this.renderItemModelTransform(stack, ibakedmodel, cameraTransformType);
|
| 269 | }
|
| 270 | }
|
| 271 |
|
| 272 | public void renderItemModelForEntity(ItemStack stack, EntityLivingBase entityToRenderFor, ItemCameraTransforms.TransformType cameraTransformType)
|
| 273 | {
|
| 274 | if (stack != null && entityToRenderFor != null)
|
| 275 | {
|
| 276 | IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack);
|
| 277 |
|
| 278 | if (entityToRenderFor instanceof EntityPlayer)
|
| 279 | {
|
| 280 | EntityPlayer entityplayer = (EntityPlayer)entityToRenderFor;
|
| 281 | Item item = stack.getItem();
|
| 282 | ModelResourceLocation modelresourcelocation = null;
|
| 283 |
|
| 284 | if (item == Items.fishing_rod && entityplayer.fishEntity != null)
|
| 285 | {
|
| 286 | modelresourcelocation = new ModelResourceLocation("fishing_rod_cast", "inventory");
|
| 287 | }
|
| 288 | else if (item == Items.bow && entityplayer.getItemInUse() != null)
|
| 289 | {
|
| 290 | int i = stack.getMaxItemUseDuration() - entityplayer.getItemInUseCount();
|
| 291 |
|
| 292 | if (i >= 18)
|
| 293 | {
|
| 294 | modelresourcelocation = new ModelResourceLocation("bow_pulling_2", "inventory");
|
| 295 | }
|
| 296 | else if (i > 13)
|
| 297 | {
|
| 298 | modelresourcelocation = new ModelResourceLocation("bow_pulling_1", "inventory");
|
| 299 | }
|
| 300 | else if (i > 0)
|
| 301 | {
|
| 302 | modelresourcelocation = new ModelResourceLocation("bow_pulling_0", "inventory");
|
| 303 | }
|
| 304 | }
|
| 305 |
|
| 306 | if (modelresourcelocation != null)
|
| 307 | {
|
| 308 | ibakedmodel = this.itemModelMesher.getModelManager().getModel(modelresourcelocation);
|
| 309 | }
|
| 310 | }
|
| 311 |
|
| 312 | this.renderItemModelTransform(stack, ibakedmodel, cameraTransformType);
|
| 313 | }
|
| 314 | }
|
| 315 |
|
| 316 | protected void renderItemModelTransform(ItemStack stack, IBakedModel model, ItemCameraTransforms.TransformType cameraTransformType)
|
| 317 | {
|
| 318 | this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
| 319 | this.textureManager.getTexture(TextureMap.locationBlocksTexture).setBlurMipmap(false, false);
|
| 320 | this.preTransform(stack);
|
| 321 | GlStateManager.enableRescaleNormal();
|
| 322 | GlStateManager.alphaFunc(516, 0.1F);
|
| 323 | GlStateManager.enableBlend();
|
| 324 | GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
| 325 | GlStateManager.pushMatrix();
|
| 326 | ItemCameraTransforms itemcameratransforms = model.getItemCameraTransforms();
|
| 327 | itemcameratransforms.applyTransform(cameraTransformType);
|
| 328 |
|
| 329 | if (this.isThereOneNegativeScale(itemcameratransforms.getTransform(cameraTransformType)))
|
| 330 | {
|
| 331 | GlStateManager.cullFace(1028);
|
| 332 | }
|
| 333 |
|
| 334 | this.renderItem(stack, model);
|
| 335 | GlStateManager.cullFace(1029);
|
| 336 | GlStateManager.popMatrix();
|
| 337 | GlStateManager.disableRescaleNormal();
|
| 338 | GlStateManager.disableBlend();
|
| 339 | this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
| 340 | this.textureManager.getTexture(TextureMap.locationBlocksTexture).restoreLastBlurMipmap();
|
| 341 | }
|
| 342 |
|
| 343 | /**
|
| 344 | * Return true if only one scale is negative
|
| 345 | *
|
| 346 | * @param itemTranformVec The ItemTransformVec3f instance
|
| 347 | */
|
| 348 | private boolean isThereOneNegativeScale(ItemTransformVec3f itemTranformVec)
|
| 349 | {
|
| 350 | return itemTranformVec.scale.x < 0.0F ^ itemTranformVec.scale.y < 0.0F ^ itemTranformVec.scale.z < 0.0F;
|
| 351 | }
|
| 352 |
|
| 353 | public void renderItemIntoGUI(ItemStack stack, int x, int y)
|
| 354 | {
|
| 355 | IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack);
|
| 356 | GlStateManager.pushMatrix();
|
| 357 | this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
| 358 | this.textureManager.getTexture(TextureMap.locationBlocksTexture).setBlurMipmap(false, false);
|
| 359 | GlStateManager.enableRescaleNormal();
|
| 360 | GlStateManager.enableAlpha();
|
| 361 | GlStateManager.alphaFunc(516, 0.1F);
|
| 362 | GlStateManager.enableBlend();
|
| 363 | GlStateManager.blendFunc(770, 771);
|
| 364 | GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
| 365 | this.setupGuiTransform(x, y, ibakedmodel.isGui3d());
|
| 366 | ibakedmodel.getItemCameraTransforms().applyTransform(ItemCameraTransforms.TransformType.GUI);
|
| 367 | this.renderItem(stack, ibakedmodel);
|
| 368 | GlStateManager.disableAlpha();
|
| 369 | GlStateManager.disableRescaleNormal();
|
| 370 | GlStateManager.disableLighting();
|
| 371 | GlStateManager.popMatrix();
|
| 372 | this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
| 373 | this.textureManager.getTexture(TextureMap.locationBlocksTexture).restoreLastBlurMipmap();
|
| 374 | }
|
| 375 |
|
| 376 | private void setupGuiTransform(int xPosition, int yPosition, boolean isGui3d)
|
| 377 | {
|
| 378 | GlStateManager.translate((float)xPosition, (float)yPosition, 100.0F + this.zLevel);
|
| 379 | GlStateManager.translate(8.0F, 8.0F, 0.0F);
|
| 380 | GlStateManager.scale(1.0F, 1.0F, -1.0F);
|
| 381 | GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
| 382 |
|
| 383 | if (isGui3d)
|
| 384 | {
|
| 385 | GlStateManager.scale(40.0F, 40.0F, 40.0F);
|
| 386 | GlStateManager.rotate(210.0F, 1.0F, 0.0F, 0.0F);
|
| 387 | GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
|
| 388 | GlStateManager.enableLighting();
|
| 389 | }
|
| 390 | else
|
| 391 | {
|
| 392 | GlStateManager.scale(64.0F, 64.0F, 64.0F);
|
| 393 | GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
|
| 394 | GlStateManager.disableLighting();
|
| 395 | }
|
| 396 | }
|
| 397 |
|
| 398 | public void renderItemAndEffectIntoGUI(final ItemStack stack, int xPosition, int yPosition)
|
| 399 | {
|
| 400 | if (stack != null && stack.getItem() != null)
|
| 401 | {
|
| 402 | this.zLevel += 50.0F;
|
| 403 |
|
| 404 | try
|
| 405 | {
|
| 406 | this.renderItemIntoGUI(stack, xPosition, yPosition);
|
| 407 | }
|
| 408 | catch (Throwable throwable)
|
| 409 | {
|
| 410 | CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Rendering item");
|
| 411 | CrashReportCategory crashreportcategory = crashreport.makeCategory("Item being rendered");
|
| 412 | crashreportcategory.addCrashSectionCallable("Item Type", new Callable<String>()
|
| 413 | {
|
| 414 | public String call() throws Exception
|
| 415 | {
|
| 416 | return String.valueOf((Object)stack.getItem());
|
| 417 | }
|
| 418 | });
|
| 419 | crashreportcategory.addCrashSectionCallable("Item Aux", new Callable<String>()
|
| 420 | {
|
| 421 | public String call() throws Exception
|
| 422 | {
|
| 423 | return String.valueOf(stack.getMetadata());
|
| 424 | }
|
| 425 | });
|
| 426 | crashreportcategory.addCrashSectionCallable("Item NBT", new Callable<String>()
|
| 427 | {
|
| 428 | public String call() throws Exception
|
| 429 | {
|
| 430 | return String.valueOf((Object)stack.getTagCompound());
|
| 431 | }
|
| 432 | });
|
| 433 | crashreportcategory.addCrashSectionCallable("Item Foil", new Callable<String>()
|
| 434 | {
|
| 435 | public String call() throws Exception
|
| 436 | {
|
| 437 | return String.valueOf(stack.hasEffect());
|
| 438 | }
|
| 439 | });
|
| 440 | throw new ReportedException(crashreport);
|
| 441 | }
|
| 442 |
|
| 443 | this.zLevel -= 50.0F;
|
| 444 | }
|
| 445 | }
|
| 446 |
|
| 447 | public void renderItemOverlays(FontRenderer fr, ItemStack stack, int xPosition, int yPosition)
|
| 448 | {
|
| 449 | this.renderItemOverlayIntoGUI(fr, stack, xPosition, yPosition, (String)null);
|
| 450 | }
|
| 451 |
|
| 452 | /**
|
| 453 | * Renders the stack size and/or damage bar for the given ItemStack.
|
| 454 | */
|
| 455 | public void renderItemOverlayIntoGUI(FontRenderer fr, ItemStack stack, int xPosition, int yPosition, String text)
|
| 456 | {
|
| 457 | if (stack != null)
|
| 458 | {
|
| 459 | if (stack.stackSize != 1 || text != null)
|
| 460 | {
|
| 461 | String s = text == null ? String.valueOf(stack.stackSize) : text;
|
| 462 |
|
| 463 | if (text == null && stack.stackSize < 1)
|
| 464 | {
|
| 465 | s = EnumChatFormatting.RED + String.valueOf(stack.stackSize);
|
| 466 | }
|
| 467 |
|
| 468 | GlStateManager.disableLighting();
|
| 469 | GlStateManager.disableDepth();
|
| 470 | GlStateManager.disableBlend();
|
| 471 | fr.drawStringWithShadow(s, (float)(xPosition + 19 - 2 - fr.getStringWidth(s)), (float)(yPosition + 6 + 3), 16777215);
|
| 472 | GlStateManager.enableLighting();
|
| 473 | GlStateManager.enableDepth();
|
| 474 | }
|
| 475 |
|
| 476 | if (stack.isItemDamaged())
|
| 477 | {
|
| 478 | int j = (int)Math.round(13.0D - (double)stack.getItemDamage() * 13.0D / (double)stack.getMaxDamage());
|
| 479 | int i = (int)Math.round(255.0D - (double)stack.getItemDamage() * 255.0D / (double)stack.getMaxDamage());
|
| 480 | GlStateManager.disableLighting();
|
| 481 | GlStateManager.disableDepth();
|
| 482 | GlStateManager.disableTexture2D();
|
| 483 | GlStateManager.disableAlpha();
|
| 484 | GlStateManager.disableBlend();
|
| 485 | Tessellator tessellator = Tessellator.getInstance();
|
| 486 | WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
| 487 | this.draw(worldrenderer, xPosition + 2, yPosition + 13, 13, 2, 0, 0, 0, 255);
|
| 488 | this.draw(worldrenderer, xPosition + 2, yPosition + 13, 12, 1, (255 - i) / 4, 64, 0, 255);
|
| 489 | this.draw(worldrenderer, xPosition + 2, yPosition + 13, j, 1, 255 - i, i, 0, 255);
|
| 490 | GlStateManager.enableBlend();
|
| 491 | GlStateManager.enableAlpha();
|
| 492 | GlStateManager.enableTexture2D();
|
| 493 | GlStateManager.enableLighting();
|
| 494 | GlStateManager.enableDepth();
|
| 495 | }
|
| 496 | }
|
| 497 | }
|
| 498 |
|
| 499 | /**
|
| 500 | * Draw with the WorldRenderer
|
| 501 | *
|
| 502 | * @param renderer The WorldRenderer's instance
|
| 503 | * @param x X position where the render begin
|
| 504 | * @param y Y position where the render begin
|
| 505 | * @param width The width of the render
|
| 506 | * @param height The height of the render
|
| 507 | * @param red Red component of the color
|
| 508 | * @param green Green component of the color
|
| 509 | * @param blue Blue component of the color
|
| 510 | * @param alpha Alpha component of the color
|
| 511 | */
|
| 512 | private void draw(WorldRenderer renderer, int x, int y, int width, int height, int red, int green, int blue, int alpha)
|
| 513 | {
|
| 514 | renderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
| 515 | renderer.pos((double)(x + 0), (double)(y + 0), 0.0D).color(red, green, blue, alpha).endVertex();
|
| 516 | renderer.pos((double)(x + 0), (double)(y + height), 0.0D).color(red, green, blue, alpha).endVertex();
|
| 517 | renderer.pos((double)(x + width), (double)(y + height), 0.0D).color(red, green, blue, alpha).endVertex();
|
| 518 | renderer.pos((double)(x + width), (double)(y + 0), 0.0D).color(red, green, blue, alpha).endVertex();
|
| 519 | Tessellator.getInstance().draw();
|
| 520 | }
|
| 521 |
|
| 522 | private void registerItems()
|
| 523 | {
|
| 524 | this.registerBlock(Blocks.anvil, "anvil_intact");
|
| 525 | this.registerBlock(Blocks.anvil, 1, "anvil_slightly_damaged");
|
| 526 | this.registerBlock(Blocks.anvil, 2, "anvil_very_damaged");
|
| 527 | this.registerBlock(Blocks.carpet, EnumDyeColor.BLACK.getMetadata(), "black_carpet");
|
| 528 | this.registerBlock(Blocks.carpet, EnumDyeColor.BLUE.getMetadata(), "blue_carpet");
|
| 529 | this.registerBlock(Blocks.carpet, EnumDyeColor.BROWN.getMetadata(), "brown_carpet");
|
| 530 | this.registerBlock(Blocks.carpet, EnumDyeColor.CYAN.getMetadata(), "cyan_carpet");
|
| 531 | this.registerBlock(Blocks.carpet, EnumDyeColor.GRAY.getMetadata(), "gray_carpet");
|
| 532 | this.registerBlock(Blocks.carpet, EnumDyeColor.GREEN.getMetadata(), "green_carpet");
|
| 533 | this.registerBlock(Blocks.carpet, EnumDyeColor.LIGHT_BLUE.getMetadata(), "light_blue_carpet");
|
| 534 | this.registerBlock(Blocks.carpet, EnumDyeColor.LIME.getMetadata(), "lime_carpet");
|
| 535 | this.registerBlock(Blocks.carpet, EnumDyeColor.MAGENTA.getMetadata(), "magenta_carpet");
|
| 536 | this.registerBlock(Blocks.carpet, EnumDyeColor.ORANGE.getMetadata(), "orange_carpet");
|
| 537 | this.registerBlock(Blocks.carpet, EnumDyeColor.PINK.getMetadata(), "pink_carpet");
|
| 538 | this.registerBlock(Blocks.carpet, EnumDyeColor.PURPLE.getMetadata(), "purple_carpet");
|
| 539 | this.registerBlock(Blocks.carpet, EnumDyeColor.RED.getMetadata(), "red_carpet");
|
| 540 | this.registerBlock(Blocks.carpet, EnumDyeColor.SILVER.getMetadata(), "silver_carpet");
|
| 541 | this.registerBlock(Blocks.carpet, EnumDyeColor.WHITE.getMetadata(), "white_carpet");
|
| 542 | this.registerBlock(Blocks.carpet, EnumDyeColor.YELLOW.getMetadata(), "yellow_carpet");
|
| 543 | this.registerBlock(Blocks.cobblestone_wall, BlockWall.EnumType.MOSSY.getMetadata(), "mossy_cobblestone_wall");
|
| 544 | this.registerBlock(Blocks.cobblestone_wall, BlockWall.EnumType.NORMAL.getMetadata(), "cobblestone_wall");
|
| 545 | this.registerBlock(Blocks.dirt, BlockDirt.DirtType.COARSE_DIRT.getMetadata(), "coarse_dirt");
|
| 546 | this.registerBlock(Blocks.dirt, BlockDirt.DirtType.DIRT.getMetadata(), "dirt");
|
| 547 | this.registerBlock(Blocks.dirt, BlockDirt.DirtType.PODZOL.getMetadata(), "podzol");
|
| 548 | this.registerBlock(Blocks.double_plant, BlockDoublePlant.EnumPlantType.FERN.getMeta(), "double_fern");
|
| 549 | this.registerBlock(Blocks.double_plant, BlockDoublePlant.EnumPlantType.GRASS.getMeta(), "double_grass");
|
| 550 | this.registerBlock(Blocks.double_plant, BlockDoublePlant.EnumPlantType.PAEONIA.getMeta(), "paeonia");
|
| 551 | this.registerBlock(Blocks.double_plant, BlockDoublePlant.EnumPlantType.ROSE.getMeta(), "double_rose");
|
| 552 | this.registerBlock(Blocks.double_plant, BlockDoublePlant.EnumPlantType.SUNFLOWER.getMeta(), "sunflower");
|
| 553 | this.registerBlock(Blocks.double_plant, BlockDoublePlant.EnumPlantType.SYRINGA.getMeta(), "syringa");
|
| 554 | this.registerBlock(Blocks.leaves, BlockPlanks.EnumType.BIRCH.getMetadata(), "birch_leaves");
|
| 555 | this.registerBlock(Blocks.leaves, BlockPlanks.EnumType.JUNGLE.getMetadata(), "jungle_leaves");
|
| 556 | this.registerBlock(Blocks.leaves, BlockPlanks.EnumType.OAK.getMetadata(), "oak_leaves");
|
| 557 | this.registerBlock(Blocks.leaves, BlockPlanks.EnumType.SPRUCE.getMetadata(), "spruce_leaves");
|
| 558 | this.registerBlock(Blocks.leaves2, BlockPlanks.EnumType.ACACIA.getMetadata() - 4, "acacia_leaves");
|
| 559 | this.registerBlock(Blocks.leaves2, BlockPlanks.EnumType.DARK_OAK.getMetadata() - 4, "dark_oak_leaves");
|
| 560 | this.registerBlock(Blocks.log, BlockPlanks.EnumType.BIRCH.getMetadata(), "birch_log");
|
| 561 | this.registerBlock(Blocks.log, BlockPlanks.EnumType.JUNGLE.getMetadata(), "jungle_log");
|
| 562 | this.registerBlock(Blocks.log, BlockPlanks.EnumType.OAK.getMetadata(), "oak_log");
|
| 563 | this.registerBlock(Blocks.log, BlockPlanks.EnumType.SPRUCE.getMetadata(), "spruce_log");
|
| 564 | this.registerBlock(Blocks.log2, BlockPlanks.EnumType.ACACIA.getMetadata() - 4, "acacia_log");
|
| 565 | this.registerBlock(Blocks.log2, BlockPlanks.EnumType.DARK_OAK.getMetadata() - 4, "dark_oak_log");
|
| 566 | this.registerBlock(Blocks.monster_egg, BlockSilverfish.EnumType.CHISELED_STONEBRICK.getMetadata(), "chiseled_brick_monster_egg");
|
| 567 | this.registerBlock(Blocks.monster_egg, BlockSilverfish.EnumType.COBBLESTONE.getMetadata(), "cobblestone_monster_egg");
|
| 568 | this.registerBlock(Blocks.monster_egg, BlockSilverfish.EnumType.CRACKED_STONEBRICK.getMetadata(), "cracked_brick_monster_egg");
|
| 569 | this.registerBlock(Blocks.monster_egg, BlockSilverfish.EnumType.MOSSY_STONEBRICK.getMetadata(), "mossy_brick_monster_egg");
|
| 570 | this.registerBlock(Blocks.monster_egg, BlockSilverfish.EnumType.STONE.getMetadata(), "stone_monster_egg");
|
| 571 | this.registerBlock(Blocks.monster_egg, BlockSilverfish.EnumType.STONEBRICK.getMetadata(), "stone_brick_monster_egg");
|
| 572 | this.registerBlock(Blocks.planks, BlockPlanks.EnumType.ACACIA.getMetadata(), "acacia_planks");
|
| 573 | this.registerBlock(Blocks.planks, BlockPlanks.EnumType.BIRCH.getMetadata(), "birch_planks");
|
| 574 | this.registerBlock(Blocks.planks, BlockPlanks.EnumType.DARK_OAK.getMetadata(), "dark_oak_planks");
|
| 575 | this.registerBlock(Blocks.planks, BlockPlanks.EnumType.JUNGLE.getMetadata(), "jungle_planks");
|
| 576 | this.registerBlock(Blocks.planks, BlockPlanks.EnumType.OAK.getMetadata(), "oak_planks");
|
| 577 | this.registerBlock(Blocks.planks, BlockPlanks.EnumType.SPRUCE.getMetadata(), "spruce_planks");
|
| 578 | this.registerBlock(Blocks.prismarine, BlockPrismarine.EnumType.BRICKS.getMetadata(), "prismarine_bricks");
|
| 579 | this.registerBlock(Blocks.prismarine, BlockPrismarine.EnumType.DARK.getMetadata(), "dark_prismarine");
|
| 580 | this.registerBlock(Blocks.prismarine, BlockPrismarine.EnumType.ROUGH.getMetadata(), "prismarine");
|
| 581 | this.registerBlock(Blocks.quartz_block, BlockQuartz.EnumType.CHISELED.getMetadata(), "chiseled_quartz_block");
|
| 582 | this.registerBlock(Blocks.quartz_block, BlockQuartz.EnumType.DEFAULT.getMetadata(), "quartz_block");
|
| 583 | this.registerBlock(Blocks.quartz_block, BlockQuartz.EnumType.LINES_Y.getMetadata(), "quartz_column");
|
| 584 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.ALLIUM.getMeta(), "allium");
|
| 585 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.BLUE_ORCHID.getMeta(), "blue_orchid");
|
| 586 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.HOUSTONIA.getMeta(), "houstonia");
|
| 587 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.ORANGE_TULIP.getMeta(), "orange_tulip");
|
| 588 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.OXEYE_DAISY.getMeta(), "oxeye_daisy");
|
| 589 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.PINK_TULIP.getMeta(), "pink_tulip");
|
| 590 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.POPPY.getMeta(), "poppy");
|
| 591 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.RED_TULIP.getMeta(), "red_tulip");
|
| 592 | this.registerBlock(Blocks.red_flower, BlockFlower.EnumFlowerType.WHITE_TULIP.getMeta(), "white_tulip");
|
| 593 | this.registerBlock(Blocks.sand, BlockSand.EnumType.RED_SAND.getMetadata(), "red_sand");
|
| 594 | this.registerBlock(Blocks.sand, BlockSand.EnumType.SAND.getMetadata(), "sand");
|
| 595 | this.registerBlock(Blocks.sandstone, BlockSandStone.EnumType.CHISELED.getMetadata(), "chiseled_sandstone");
|
| 596 | this.registerBlock(Blocks.sandstone, BlockSandStone.EnumType.DEFAULT.getMetadata(), "sandstone");
|
| 597 | this.registerBlock(Blocks.sandstone, BlockSandStone.EnumType.SMOOTH.getMetadata(), "smooth_sandstone");
|
| 598 | this.registerBlock(Blocks.red_sandstone, BlockRedSandstone.EnumType.CHISELED.getMetadata(), "chiseled_red_sandstone");
|
| 599 | this.registerBlock(Blocks.red_sandstone, BlockRedSandstone.EnumType.DEFAULT.getMetadata(), "red_sandstone");
|
| 600 | this.registerBlock(Blocks.red_sandstone, BlockRedSandstone.EnumType.SMOOTH.getMetadata(), "smooth_red_sandstone");
|
| 601 | this.registerBlock(Blocks.sapling, BlockPlanks.EnumType.ACACIA.getMetadata(), "acacia_sapling");
|
| 602 | this.registerBlock(Blocks.sapling, BlockPlanks.EnumType.BIRCH.getMetadata(), "birch_sapling");
|
| 603 | this.registerBlock(Blocks.sapling, BlockPlanks.EnumType.DARK_OAK.getMetadata(), "dark_oak_sapling");
|
| 604 | this.registerBlock(Blocks.sapling, BlockPlanks.EnumType.JUNGLE.getMetadata(), "jungle_sapling");
|
| 605 | this.registerBlock(Blocks.sapling, BlockPlanks.EnumType.OAK.getMetadata(), "oak_sapling");
|
| 606 | this.registerBlock(Blocks.sapling, BlockPlanks.EnumType.SPRUCE.getMetadata(), "spruce_sapling");
|
| 607 | this.registerBlock(Blocks.sponge, 0, "sponge");
|
| 608 | this.registerBlock(Blocks.sponge, 1, "sponge_wet");
|
| 609 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.BLACK.getMetadata(), "black_stained_glass");
|
| 610 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.BLUE.getMetadata(), "blue_stained_glass");
|
| 611 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.BROWN.getMetadata(), "brown_stained_glass");
|
| 612 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.CYAN.getMetadata(), "cyan_stained_glass");
|
| 613 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.GRAY.getMetadata(), "gray_stained_glass");
|
| 614 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.GREEN.getMetadata(), "green_stained_glass");
|
| 615 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.LIGHT_BLUE.getMetadata(), "light_blue_stained_glass");
|
| 616 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.LIME.getMetadata(), "lime_stained_glass");
|
| 617 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.MAGENTA.getMetadata(), "magenta_stained_glass");
|
| 618 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.ORANGE.getMetadata(), "orange_stained_glass");
|
| 619 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.PINK.getMetadata(), "pink_stained_glass");
|
| 620 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.PURPLE.getMetadata(), "purple_stained_glass");
|
| 621 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.RED.getMetadata(), "red_stained_glass");
|
| 622 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.SILVER.getMetadata(), "silver_stained_glass");
|
| 623 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.WHITE.getMetadata(), "white_stained_glass");
|
| 624 | this.registerBlock(Blocks.stained_glass, EnumDyeColor.YELLOW.getMetadata(), "yellow_stained_glass");
|
| 625 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.BLACK.getMetadata(), "black_stained_glass_pane");
|
| 626 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.BLUE.getMetadata(), "blue_stained_glass_pane");
|
| 627 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.BROWN.getMetadata(), "brown_stained_glass_pane");
|
| 628 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.CYAN.getMetadata(), "cyan_stained_glass_pane");
|
| 629 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.GRAY.getMetadata(), "gray_stained_glass_pane");
|
| 630 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.GREEN.getMetadata(), "green_stained_glass_pane");
|
| 631 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.LIGHT_BLUE.getMetadata(), "light_blue_stained_glass_pane");
|
| 632 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.LIME.getMetadata(), "lime_stained_glass_pane");
|
| 633 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.MAGENTA.getMetadata(), "magenta_stained_glass_pane");
|
| 634 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.ORANGE.getMetadata(), "orange_stained_glass_pane");
|
| 635 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.PINK.getMetadata(), "pink_stained_glass_pane");
|
| 636 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.PURPLE.getMetadata(), "purple_stained_glass_pane");
|
| 637 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.RED.getMetadata(), "red_stained_glass_pane");
|
| 638 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.SILVER.getMetadata(), "silver_stained_glass_pane");
|
| 639 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.WHITE.getMetadata(), "white_stained_glass_pane");
|
| 640 | this.registerBlock(Blocks.stained_glass_pane, EnumDyeColor.YELLOW.getMetadata(), "yellow_stained_glass_pane");
|
| 641 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.BLACK.getMetadata(), "black_stained_hardened_clay");
|
| 642 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.BLUE.getMetadata(), "blue_stained_hardened_clay");
|
| 643 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.BROWN.getMetadata(), "brown_stained_hardened_clay");
|
| 644 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.CYAN.getMetadata(), "cyan_stained_hardened_clay");
|
| 645 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.GRAY.getMetadata(), "gray_stained_hardened_clay");
|
| 646 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.GREEN.getMetadata(), "green_stained_hardened_clay");
|
| 647 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.LIGHT_BLUE.getMetadata(), "light_blue_stained_hardened_clay");
|
| 648 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.LIME.getMetadata(), "lime_stained_hardened_clay");
|
| 649 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.MAGENTA.getMetadata(), "magenta_stained_hardened_clay");
|
| 650 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.ORANGE.getMetadata(), "orange_stained_hardened_clay");
|
| 651 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.PINK.getMetadata(), "pink_stained_hardened_clay");
|
| 652 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.PURPLE.getMetadata(), "purple_stained_hardened_clay");
|
| 653 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.RED.getMetadata(), "red_stained_hardened_clay");
|
| 654 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.SILVER.getMetadata(), "silver_stained_hardened_clay");
|
| 655 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.WHITE.getMetadata(), "white_stained_hardened_clay");
|
| 656 | this.registerBlock(Blocks.stained_hardened_clay, EnumDyeColor.YELLOW.getMetadata(), "yellow_stained_hardened_clay");
|
| 657 | this.registerBlock(Blocks.stone, BlockStone.EnumType.ANDESITE.getMetadata(), "andesite");
|
| 658 | this.registerBlock(Blocks.stone, BlockStone.EnumType.ANDESITE_SMOOTH.getMetadata(), "andesite_smooth");
|
| 659 | this.registerBlock(Blocks.stone, BlockStone.EnumType.DIORITE.getMetadata(), "diorite");
|
| 660 | this.registerBlock(Blocks.stone, BlockStone.EnumType.DIORITE_SMOOTH.getMetadata(), "diorite_smooth");
|
| 661 | this.registerBlock(Blocks.stone, BlockStone.EnumType.GRANITE.getMetadata(), "granite");
|
| 662 | this.registerBlock(Blocks.stone, BlockStone.EnumType.GRANITE_SMOOTH.getMetadata(), "granite_smooth");
|
| 663 | this.registerBlock(Blocks.stone, BlockStone.EnumType.STONE.getMetadata(), "stone");
|
| 664 | this.registerBlock(Blocks.stonebrick, BlockStoneBrick.EnumType.CRACKED.getMetadata(), "cracked_stonebrick");
|
| 665 | this.registerBlock(Blocks.stonebrick, BlockStoneBrick.EnumType.DEFAULT.getMetadata(), "stonebrick");
|
| 666 | this.registerBlock(Blocks.stonebrick, BlockStoneBrick.EnumType.CHISELED.getMetadata(), "chiseled_stonebrick");
|
| 667 | this.registerBlock(Blocks.stonebrick, BlockStoneBrick.EnumType.MOSSY.getMetadata(), "mossy_stonebrick");
|
| 668 | this.registerBlock(Blocks.stone_slab, BlockStoneSlab.EnumType.BRICK.getMetadata(), "brick_slab");
|
| 669 | this.registerBlock(Blocks.stone_slab, BlockStoneSlab.EnumType.COBBLESTONE.getMetadata(), "cobblestone_slab");
|
| 670 | this.registerBlock(Blocks.stone_slab, BlockStoneSlab.EnumType.WOOD.getMetadata(), "old_wood_slab");
|
| 671 | this.registerBlock(Blocks.stone_slab, BlockStoneSlab.EnumType.NETHERBRICK.getMetadata(), "nether_brick_slab");
|
| 672 | this.registerBlock(Blocks.stone_slab, BlockStoneSlab.EnumType.QUARTZ.getMetadata(), "quartz_slab");
|
| 673 | this.registerBlock(Blocks.stone_slab, BlockStoneSlab.EnumType.SAND.getMetadata(), "sandstone_slab");
|
| 674 | this.registerBlock(Blocks.stone_slab, BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata(), "stone_brick_slab");
|
| 675 | this.registerBlock(Blocks.stone_slab, BlockStoneSlab.EnumType.STONE.getMetadata(), "stone_slab");
|
| 676 | this.registerBlock(Blocks.stone_slab2, BlockStoneSlabNew.EnumType.RED_SANDSTONE.getMetadata(), "red_sandstone_slab");
|
| 677 | this.registerBlock(Blocks.tallgrass, BlockTallGrass.EnumType.DEAD_BUSH.getMeta(), "dead_bush");
|
| 678 | this.registerBlock(Blocks.tallgrass, BlockTallGrass.EnumType.FERN.getMeta(), "fern");
|
| 679 | this.registerBlock(Blocks.tallgrass, BlockTallGrass.EnumType.GRASS.getMeta(), "tall_grass");
|
| 680 | this.registerBlock(Blocks.wooden_slab, BlockPlanks.EnumType.ACACIA.getMetadata(), "acacia_slab");
|
| 681 | this.registerBlock(Blocks.wooden_slab, BlockPlanks.EnumType.BIRCH.getMetadata(), "birch_slab");
|
| 682 | this.registerBlock(Blocks.wooden_slab, BlockPlanks.EnumType.DARK_OAK.getMetadata(), "dark_oak_slab");
|
| 683 | this.registerBlock(Blocks.wooden_slab, BlockPlanks.EnumType.JUNGLE.getMetadata(), "jungle_slab");
|
| 684 | this.registerBlock(Blocks.wooden_slab, BlockPlanks.EnumType.OAK.getMetadata(), "oak_slab");
|
| 685 | this.registerBlock(Blocks.wooden_slab, BlockPlanks.EnumType.SPRUCE.getMetadata(), "spruce_slab");
|
| 686 | this.registerBlock(Blocks.wool, EnumDyeColor.BLACK.getMetadata(), "black_wool");
|
| 687 | this.registerBlock(Blocks.wool, EnumDyeColor.BLUE.getMetadata(), "blue_wool");
|
| 688 | this.registerBlock(Blocks.wool, EnumDyeColor.BROWN.getMetadata(), "brown_wool");
|
| 689 | this.registerBlock(Blocks.wool, EnumDyeColor.CYAN.getMetadata(), "cyan_wool");
|
| 690 | this.registerBlock(Blocks.wool, EnumDyeColor.GRAY.getMetadata(), "gray_wool");
|
| 691 | this.registerBlock(Blocks.wool, EnumDyeColor.GREEN.getMetadata(), "green_wool");
|
| 692 | this.registerBlock(Blocks.wool, EnumDyeColor.LIGHT_BLUE.getMetadata(), "light_blue_wool");
|
| 693 | this.registerBlock(Blocks.wool, EnumDyeColor.LIME.getMetadata(), "lime_wool");
|
| 694 | this.registerBlock(Blocks.wool, EnumDyeColor.MAGENTA.getMetadata(), "magenta_wool");
|
| 695 | this.registerBlock(Blocks.wool, EnumDyeColor.ORANGE.getMetadata(), "orange_wool");
|
| 696 | this.registerBlock(Blocks.wool, EnumDyeColor.PINK.getMetadata(), "pink_wool");
|
| 697 | this.registerBlock(Blocks.wool, EnumDyeColor.PURPLE.getMetadata(), "purple_wool");
|
| 698 | this.registerBlock(Blocks.wool, EnumDyeColor.RED.getMetadata(), "red_wool");
|
| 699 | this.registerBlock(Blocks.wool, EnumDyeColor.SILVER.getMetadata(), "silver_wool");
|
| 700 | this.registerBlock(Blocks.wool, EnumDyeColor.WHITE.getMetadata(), "white_wool");
|
| 701 | this.registerBlock(Blocks.wool, EnumDyeColor.YELLOW.getMetadata(), "yellow_wool");
|
| 702 | this.registerBlock(Blocks.acacia_stairs, "acacia_stairs");
|
| 703 | this.registerBlock(Blocks.activator_rail, "activator_rail");
|
| 704 | this.registerBlock(Blocks.beacon, "beacon");
|
| 705 | this.registerBlock(Blocks.bedrock, "bedrock");
|
| 706 | this.registerBlock(Blocks.birch_stairs, "birch_stairs");
|
| 707 | this.registerBlock(Blocks.bookshelf, "bookshelf");
|
| 708 | this.registerBlock(Blocks.brick_block, "brick_block");
|
| 709 | this.registerBlock(Blocks.brick_block, "brick_block");
|
| 710 | this.registerBlock(Blocks.brick_stairs, "brick_stairs");
|
| 711 | this.registerBlock(Blocks.brown_mushroom, "brown_mushroom");
|
| 712 | this.registerBlock(Blocks.cactus, "cactus");
|
| 713 | this.registerBlock(Blocks.clay, "clay");
|
| 714 | this.registerBlock(Blocks.coal_block, "coal_block");
|
| 715 | this.registerBlock(Blocks.coal_ore, "coal_ore");
|
| 716 | this.registerBlock(Blocks.cobblestone, "cobblestone");
|
| 717 | this.registerBlock(Blocks.crafting_table, "crafting_table");
|
| 718 | this.registerBlock(Blocks.dark_oak_stairs, "dark_oak_stairs");
|
| 719 | this.registerBlock(Blocks.daylight_detector, "daylight_detector");
|
| 720 | this.registerBlock(Blocks.deadbush, "dead_bush");
|
| 721 | this.registerBlock(Blocks.detector_rail, "detector_rail");
|
| 722 | this.registerBlock(Blocks.diamond_block, "diamond_block");
|
| 723 | this.registerBlock(Blocks.diamond_ore, "diamond_ore");
|
| 724 | this.registerBlock(Blocks.dispenser, "dispenser");
|
| 725 | this.registerBlock(Blocks.dropper, "dropper");
|
| 726 | this.registerBlock(Blocks.emerald_block, "emerald_block");
|
| 727 | this.registerBlock(Blocks.emerald_ore, "emerald_ore");
|
| 728 | this.registerBlock(Blocks.enchanting_table, "enchanting_table");
|
| 729 | this.registerBlock(Blocks.end_portal_frame, "end_portal_frame");
|
| 730 | this.registerBlock(Blocks.end_stone, "end_stone");
|
| 731 | this.registerBlock(Blocks.oak_fence, "oak_fence");
|
| 732 | this.registerBlock(Blocks.spruce_fence, "spruce_fence");
|
| 733 | this.registerBlock(Blocks.birch_fence, "birch_fence");
|
| 734 | this.registerBlock(Blocks.jungle_fence, "jungle_fence");
|
| 735 | this.registerBlock(Blocks.dark_oak_fence, "dark_oak_fence");
|
| 736 | this.registerBlock(Blocks.acacia_fence, "acacia_fence");
|
| 737 | this.registerBlock(Blocks.oak_fence_gate, "oak_fence_gate");
|
| 738 | this.registerBlock(Blocks.spruce_fence_gate, "spruce_fence_gate");
|
| 739 | this.registerBlock(Blocks.birch_fence_gate, "birch_fence_gate");
|
| 740 | this.registerBlock(Blocks.jungle_fence_gate, "jungle_fence_gate");
|
| 741 | this.registerBlock(Blocks.dark_oak_fence_gate, "dark_oak_fence_gate");
|
| 742 | this.registerBlock(Blocks.acacia_fence_gate, "acacia_fence_gate");
|
| 743 | this.registerBlock(Blocks.furnace, "furnace");
|
| 744 | this.registerBlock(Blocks.glass, "glass");
|
| 745 | this.registerBlock(Blocks.glass_pane, "glass_pane");
|
| 746 | this.registerBlock(Blocks.glowstone, "glowstone");
|
| 747 | this.registerBlock(Blocks.golden_rail, "golden_rail");
|
| 748 | this.registerBlock(Blocks.gold_block, "gold_block");
|
| 749 | this.registerBlock(Blocks.gold_ore, "gold_ore");
|
| 750 | this.registerBlock(Blocks.grass, "grass");
|
| 751 | this.registerBlock(Blocks.gravel, "gravel");
|
| 752 | this.registerBlock(Blocks.hardened_clay, "hardened_clay");
|
| 753 | this.registerBlock(Blocks.hay_block, "hay_block");
|
| 754 | this.registerBlock(Blocks.heavy_weighted_pressure_plate, "heavy_weighted_pressure_plate");
|
| 755 | this.registerBlock(Blocks.hopper, "hopper");
|
| 756 | this.registerBlock(Blocks.ice, "ice");
|
| 757 | this.registerBlock(Blocks.iron_bars, "iron_bars");
|
| 758 | this.registerBlock(Blocks.iron_block, "iron_block");
|
| 759 | this.registerBlock(Blocks.iron_ore, "iron_ore");
|
| 760 | this.registerBlock(Blocks.iron_trapdoor, "iron_trapdoor");
|
| 761 | this.registerBlock(Blocks.jukebox, "jukebox");
|
| 762 | this.registerBlock(Blocks.jungle_stairs, "jungle_stairs");
|
| 763 | this.registerBlock(Blocks.ladder, "ladder");
|
| 764 | this.registerBlock(Blocks.lapis_block, "lapis_block");
|
| 765 | this.registerBlock(Blocks.lapis_ore, "lapis_ore");
|
| 766 | this.registerBlock(Blocks.lever, "lever");
|
| 767 | this.registerBlock(Blocks.light_weighted_pressure_plate, "light_weighted_pressure_plate");
|
| 768 | this.registerBlock(Blocks.lit_pumpkin, "lit_pumpkin");
|
| 769 | this.registerBlock(Blocks.melon_block, "melon_block");
|
| 770 | this.registerBlock(Blocks.mossy_cobblestone, "mossy_cobblestone");
|
| 771 | this.registerBlock(Blocks.mycelium, "mycelium");
|
| 772 | this.registerBlock(Blocks.netherrack, "netherrack");
|
| 773 | this.registerBlock(Blocks.nether_brick, "nether_brick");
|
| 774 | this.registerBlock(Blocks.nether_brick_fence, "nether_brick_fence");
|
| 775 | this.registerBlock(Blocks.nether_brick_stairs, "nether_brick_stairs");
|
| 776 | this.registerBlock(Blocks.noteblock, "noteblock");
|
| 777 | this.registerBlock(Blocks.oak_stairs, "oak_stairs");
|
| 778 | this.registerBlock(Blocks.obsidian, "obsidian");
|
| 779 | this.registerBlock(Blocks.packed_ice, "packed_ice");
|
| 780 | this.registerBlock(Blocks.piston, "piston");
|
| 781 | this.registerBlock(Blocks.pumpkin, "pumpkin");
|
| 782 | this.registerBlock(Blocks.quartz_ore, "quartz_ore");
|
| 783 | this.registerBlock(Blocks.quartz_stairs, "quartz_stairs");
|
| 784 | this.registerBlock(Blocks.rail, "rail");
|
| 785 | this.registerBlock(Blocks.redstone_block, "redstone_block");
|
| 786 | this.registerBlock(Blocks.redstone_lamp, "redstone_lamp");
|
| 787 | this.registerBlock(Blocks.redstone_ore, "redstone_ore");
|
| 788 | this.registerBlock(Blocks.redstone_torch, "redstone_torch");
|
| 789 | this.registerBlock(Blocks.red_mushroom, "red_mushroom");
|
| 790 | this.registerBlock(Blocks.sandstone_stairs, "sandstone_stairs");
|
| 791 | this.registerBlock(Blocks.red_sandstone_stairs, "red_sandstone_stairs");
|
| 792 | this.registerBlock(Blocks.sea_lantern, "sea_lantern");
|
| 793 | this.registerBlock(Blocks.slime_block, "slime");
|
| 794 | this.registerBlock(Blocks.snow, "snow");
|
| 795 | this.registerBlock(Blocks.snow_layer, "snow_layer");
|
| 796 | this.registerBlock(Blocks.soul_sand, "soul_sand");
|
| 797 | this.registerBlock(Blocks.spruce_stairs, "spruce_stairs");
|
| 798 | this.registerBlock(Blocks.sticky_piston, "sticky_piston");
|
| 799 | this.registerBlock(Blocks.stone_brick_stairs, "stone_brick_stairs");
|
| 800 | this.registerBlock(Blocks.stone_button, "stone_button");
|
| 801 | this.registerBlock(Blocks.stone_pressure_plate, "stone_pressure_plate");
|
| 802 | this.registerBlock(Blocks.stone_stairs, "stone_stairs");
|
| 803 | this.registerBlock(Blocks.tnt, "tnt");
|
| 804 | this.registerBlock(Blocks.torch, "torch");
|
| 805 | this.registerBlock(Blocks.trapdoor, "trapdoor");
|
| 806 | this.registerBlock(Blocks.tripwire_hook, "tripwire_hook");
|
| 807 | this.registerBlock(Blocks.vine, "vine");
|
| 808 | this.registerBlock(Blocks.waterlily, "waterlily");
|
| 809 | this.registerBlock(Blocks.web, "web");
|
| 810 | this.registerBlock(Blocks.wooden_button, "wooden_button");
|
| 811 | this.registerBlock(Blocks.wooden_pressure_plate, "wooden_pressure_plate");
|
| 812 | this.registerBlock(Blocks.yellow_flower, BlockFlower.EnumFlowerType.DANDELION.getMeta(), "dandelion");
|
| 813 | this.registerBlock(Blocks.chest, "chest");
|
| 814 | this.registerBlock(Blocks.trapped_chest, "trapped_chest");
|
| 815 | this.registerBlock(Blocks.ender_chest, "ender_chest");
|
| 816 | this.registerItem(Items.iron_shovel, "iron_shovel");
|
| 817 | this.registerItem(Items.iron_pickaxe, "iron_pickaxe");
|
| 818 | this.registerItem(Items.iron_axe, "iron_axe");
|
| 819 | this.registerItem(Items.flint_and_steel, "flint_and_steel");
|
| 820 | this.registerItem(Items.apple, "apple");
|
| 821 | this.registerItem(Items.bow, 0, "bow");
|
| 822 | this.registerItem(Items.bow, 1, "bow_pulling_0");
|
| 823 | this.registerItem(Items.bow, 2, "bow_pulling_1");
|
| 824 | this.registerItem(Items.bow, 3, "bow_pulling_2");
|
| 825 | this.registerItem(Items.arrow, "arrow");
|
| 826 | this.registerItem(Items.coal, 0, "coal");
|
| 827 | this.registerItem(Items.coal, 1, "charcoal");
|
| 828 | this.registerItem(Items.diamond, "diamond");
|
| 829 | this.registerItem(Items.iron_ingot, "iron_ingot");
|
| 830 | this.registerItem(Items.gold_ingot, "gold_ingot");
|
| 831 | this.registerItem(Items.iron_sword, "iron_sword");
|
| 832 | this.registerItem(Items.wooden_sword, "wooden_sword");
|
| 833 | this.registerItem(Items.wooden_shovel, "wooden_shovel");
|
| 834 | this.registerItem(Items.wooden_pickaxe, "wooden_pickaxe");
|
| 835 | this.registerItem(Items.wooden_axe, "wooden_axe");
|
| 836 | this.registerItem(Items.stone_sword, "stone_sword");
|
| 837 | this.registerItem(Items.stone_shovel, "stone_shovel");
|
| 838 | this.registerItem(Items.stone_pickaxe, "stone_pickaxe");
|
| 839 | this.registerItem(Items.stone_axe, "stone_axe");
|
| 840 | this.registerItem(Items.diamond_sword, "diamond_sword");
|
| 841 | this.registerItem(Items.diamond_shovel, "diamond_shovel");
|
| 842 | this.registerItem(Items.diamond_pickaxe, "diamond_pickaxe");
|
| 843 | this.registerItem(Items.diamond_axe, "diamond_axe");
|
| 844 | this.registerItem(Items.stick, "stick");
|
| 845 | this.registerItem(Items.bowl, "bowl");
|
| 846 | this.registerItem(Items.mushroom_stew, "mushroom_stew");
|
| 847 | this.registerItem(Items.golden_sword, "golden_sword");
|
| 848 | this.registerItem(Items.golden_shovel, "golden_shovel");
|
| 849 | this.registerItem(Items.golden_pickaxe, "golden_pickaxe");
|
| 850 | this.registerItem(Items.golden_axe, "golden_axe");
|
| 851 | this.registerItem(Items.string, "string");
|
| 852 | this.registerItem(Items.feather, "feather");
|
| 853 | this.registerItem(Items.gunpowder, "gunpowder");
|
| 854 | this.registerItem(Items.wooden_hoe, "wooden_hoe");
|
| 855 | this.registerItem(Items.stone_hoe, "stone_hoe");
|
| 856 | this.registerItem(Items.iron_hoe, "iron_hoe");
|
| 857 | this.registerItem(Items.diamond_hoe, "diamond_hoe");
|
| 858 | this.registerItem(Items.golden_hoe, "golden_hoe");
|
| 859 | this.registerItem(Items.wheat_seeds, "wheat_seeds");
|
| 860 | this.registerItem(Items.wheat, "wheat");
|
| 861 | this.registerItem(Items.bread, "bread");
|
| 862 | this.registerItem(Items.leather_helmet, "leather_helmet");
|
| 863 | this.registerItem(Items.leather_chestplate, "leather_chestplate");
|
| 864 | this.registerItem(Items.leather_leggings, "leather_leggings");
|
| 865 | this.registerItem(Items.leather_boots, "leather_boots");
|
| 866 | this.registerItem(Items.chainmail_helmet, "chainmail_helmet");
|
| 867 | this.registerItem(Items.chainmail_chestplate, "chainmail_chestplate");
|
| 868 | this.registerItem(Items.chainmail_leggings, "chainmail_leggings");
|
| 869 | this.registerItem(Items.chainmail_boots, "chainmail_boots");
|
| 870 | this.registerItem(Items.iron_helmet, "iron_helmet");
|
| 871 | this.registerItem(Items.iron_chestplate, "iron_chestplate");
|
| 872 | this.registerItem(Items.iron_leggings, "iron_leggings");
|
| 873 | this.registerItem(Items.iron_boots, "iron_boots");
|
| 874 | this.registerItem(Items.diamond_helmet, "diamond_helmet");
|
| 875 | this.registerItem(Items.diamond_chestplate, "diamond_chestplate");
|
| 876 | this.registerItem(Items.diamond_leggings, "diamond_leggings");
|
| 877 | this.registerItem(Items.diamond_boots, "diamond_boots");
|
| 878 | this.registerItem(Items.golden_helmet, "golden_helmet");
|
| 879 | this.registerItem(Items.golden_chestplate, "golden_chestplate");
|
| 880 | this.registerItem(Items.golden_leggings, "golden_leggings");
|
| 881 | this.registerItem(Items.golden_boots, "golden_boots");
|
| 882 | this.registerItem(Items.flint, "flint");
|
| 883 | this.registerItem(Items.porkchop, "porkchop");
|
| 884 | this.registerItem(Items.cooked_porkchop, "cooked_porkchop");
|
| 885 | this.registerItem(Items.painting, "painting");
|
| 886 | this.registerItem(Items.golden_apple, "golden_apple");
|
| 887 | this.registerItem(Items.golden_apple, 1, "golden_apple");
|
| 888 | this.registerItem(Items.sign, "sign");
|
| 889 | this.registerItem(Items.oak_door, "oak_door");
|
| 890 | this.registerItem(Items.spruce_door, "spruce_door");
|
| 891 | this.registerItem(Items.birch_door, "birch_door");
|
| 892 | this.registerItem(Items.jungle_door, "jungle_door");
|
| 893 | this.registerItem(Items.acacia_door, "acacia_door");
|
| 894 | this.registerItem(Items.dark_oak_door, "dark_oak_door");
|
| 895 | this.registerItem(Items.bucket, "bucket");
|
| 896 | this.registerItem(Items.water_bucket, "water_bucket");
|
| 897 | this.registerItem(Items.lava_bucket, "lava_bucket");
|
| 898 | this.registerItem(Items.minecart, "minecart");
|
| 899 | this.registerItem(Items.saddle, "saddle");
|
| 900 | this.registerItem(Items.iron_door, "iron_door");
|
| 901 | this.registerItem(Items.redstone, "redstone");
|
| 902 | this.registerItem(Items.snowball, "snowball");
|
| 903 | this.registerItem(Items.boat, "boat");
|
| 904 | this.registerItem(Items.leather, "leather");
|
| 905 | this.registerItem(Items.milk_bucket, "milk_bucket");
|
| 906 | this.registerItem(Items.brick, "brick");
|
| 907 | this.registerItem(Items.clay_ball, "clay_ball");
|
| 908 | this.registerItem(Items.reeds, "reeds");
|
| 909 | this.registerItem(Items.paper, "paper");
|
| 910 | this.registerItem(Items.book, "book");
|
| 911 | this.registerItem(Items.slime_ball, "slime_ball");
|
| 912 | this.registerItem(Items.chest_minecart, "chest_minecart");
|
| 913 | this.registerItem(Items.furnace_minecart, "furnace_minecart");
|
| 914 | this.registerItem(Items.egg, "egg");
|
| 915 | this.registerItem(Items.compass, "compass");
|
| 916 | this.registerItem(Items.fishing_rod, "fishing_rod");
|
| 917 | this.registerItem(Items.fishing_rod, 1, "fishing_rod_cast");
|
| 918 | this.registerItem(Items.clock, "clock");
|
| 919 | this.registerItem(Items.glowstone_dust, "glowstone_dust");
|
| 920 | this.registerItem(Items.fish, ItemFishFood.FishType.COD.getMetadata(), "cod");
|
| 921 | this.registerItem(Items.fish, ItemFishFood.FishType.SALMON.getMetadata(), "salmon");
|
| 922 | this.registerItem(Items.fish, ItemFishFood.FishType.CLOWNFISH.getMetadata(), "clownfish");
|
| 923 | this.registerItem(Items.fish, ItemFishFood.FishType.PUFFERFISH.getMetadata(), "pufferfish");
|
| 924 | this.registerItem(Items.cooked_fish, ItemFishFood.FishType.COD.getMetadata(), "cooked_cod");
|
| 925 | this.registerItem(Items.cooked_fish, ItemFishFood.FishType.SALMON.getMetadata(), "cooked_salmon");
|
| 926 | this.registerItem(Items.dye, EnumDyeColor.BLACK.getDyeDamage(), "dye_black");
|
| 927 | this.registerItem(Items.dye, EnumDyeColor.RED.getDyeDamage(), "dye_red");
|
| 928 | this.registerItem(Items.dye, EnumDyeColor.GREEN.getDyeDamage(), "dye_green");
|
| 929 | this.registerItem(Items.dye, EnumDyeColor.BROWN.getDyeDamage(), "dye_brown");
|
| 930 | this.registerItem(Items.dye, EnumDyeColor.BLUE.getDyeDamage(), "dye_blue");
|
| 931 | this.registerItem(Items.dye, EnumDyeColor.PURPLE.getDyeDamage(), "dye_purple");
|
| 932 | this.registerItem(Items.dye, EnumDyeColor.CYAN.getDyeDamage(), "dye_cyan");
|
| 933 | this.registerItem(Items.dye, EnumDyeColor.SILVER.getDyeDamage(), "dye_silver");
|
| 934 | this.registerItem(Items.dye, EnumDyeColor.GRAY.getDyeDamage(), "dye_gray");
|
| 935 | this.registerItem(Items.dye, EnumDyeColor.PINK.getDyeDamage(), "dye_pink");
|
| 936 | this.registerItem(Items.dye, EnumDyeColor.LIME.getDyeDamage(), "dye_lime");
|
| 937 | this.registerItem(Items.dye, EnumDyeColor.YELLOW.getDyeDamage(), "dye_yellow");
|
| 938 | this.registerItem(Items.dye, EnumDyeColor.LIGHT_BLUE.getDyeDamage(), "dye_light_blue");
|
| 939 | this.registerItem(Items.dye, EnumDyeColor.MAGENTA.getDyeDamage(), "dye_magenta");
|
| 940 | this.registerItem(Items.dye, EnumDyeColor.ORANGE.getDyeDamage(), "dye_orange");
|
| 941 | this.registerItem(Items.dye, EnumDyeColor.WHITE.getDyeDamage(), "dye_white");
|
| 942 | this.registerItem(Items.bone, "bone");
|
| 943 | this.registerItem(Items.sugar, "sugar");
|
| 944 | this.registerItem(Items.cake, "cake");
|
| 945 | this.registerItem(Items.bed, "bed");
|
| 946 | this.registerItem(Items.repeater, "repeater");
|
| 947 | this.registerItem(Items.cookie, "cookie");
|
| 948 | this.registerItem(Items.shears, "shears");
|
| 949 | this.registerItem(Items.melon, "melon");
|
| 950 | this.registerItem(Items.pumpkin_seeds, "pumpkin_seeds");
|
| 951 | this.registerItem(Items.melon_seeds, "melon_seeds");
|
| 952 | this.registerItem(Items.beef, "beef");
|
| 953 | this.registerItem(Items.cooked_beef, "cooked_beef");
|
| 954 | this.registerItem(Items.chicken, "chicken");
|
| 955 | this.registerItem(Items.cooked_chicken, "cooked_chicken");
|
| 956 | this.registerItem(Items.rabbit, "rabbit");
|
| 957 | this.registerItem(Items.cooked_rabbit, "cooked_rabbit");
|
| 958 | this.registerItem(Items.mutton, "mutton");
|
| 959 | this.registerItem(Items.cooked_mutton, "cooked_mutton");
|
| 960 | this.registerItem(Items.rabbit_foot, "rabbit_foot");
|
| 961 | this.registerItem(Items.rabbit_hide, "rabbit_hide");
|
| 962 | this.registerItem(Items.rabbit_stew, "rabbit_stew");
|
| 963 | this.registerItem(Items.rotten_flesh, "rotten_flesh");
|
| 964 | this.registerItem(Items.ender_pearl, "ender_pearl");
|
| 965 | this.registerItem(Items.blaze_rod, "blaze_rod");
|
| 966 | this.registerItem(Items.ghast_tear, "ghast_tear");
|
| 967 | this.registerItem(Items.gold_nugget, "gold_nugget");
|
| 968 | this.registerItem(Items.nether_wart, "nether_wart");
|
| 969 | this.itemModelMesher.register(Items.potionitem, new ItemMeshDefinition()
|
| 970 | {
|
| 971 | public ModelResourceLocation getModelLocation(ItemStack stack)
|
| 972 | {
|
| 973 | return ItemPotion.isSplash(stack.getMetadata()) ? new ModelResourceLocation("bottle_splash", "inventory") : new ModelResourceLocation("bottle_drinkable", "inventory");
|
| 974 | }
|
| 975 | });
|
| 976 | this.registerItem(Items.glass_bottle, "glass_bottle");
|
| 977 | this.registerItem(Items.spider_eye, "spider_eye");
|
| 978 | this.registerItem(Items.fermented_spider_eye, "fermented_spider_eye");
|
| 979 | this.registerItem(Items.blaze_powder, "blaze_powder");
|
| 980 | this.registerItem(Items.magma_cream, "magma_cream");
|
| 981 | this.registerItem(Items.brewing_stand, "brewing_stand");
|
| 982 | this.registerItem(Items.cauldron, "cauldron");
|
| 983 | this.registerItem(Items.ender_eye, "ender_eye");
|
| 984 | this.registerItem(Items.speckled_melon, "speckled_melon");
|
| 985 | this.itemModelMesher.register(Items.spawn_egg, new ItemMeshDefinition()
|
| 986 | {
|
| 987 | public ModelResourceLocation getModelLocation(ItemStack stack)
|
| 988 | {
|
| 989 | return new ModelResourceLocation("spawn_egg", "inventory");
|
| 990 | }
|
| 991 | });
|
| 992 | this.registerItem(Items.experience_bottle, "experience_bottle");
|
| 993 | this.registerItem(Items.fire_charge, "fire_charge");
|
| 994 | this.registerItem(Items.writable_book, "writable_book");
|
| 995 | this.registerItem(Items.emerald, "emerald");
|
| 996 | this.registerItem(Items.item_frame, "item_frame");
|
| 997 | this.registerItem(Items.flower_pot, "flower_pot");
|
| 998 | this.registerItem(Items.carrot, "carrot");
|
| 999 | this.registerItem(Items.potato, "potato");
|
| 1000 | this.registerItem(Items.baked_potato, "baked_potato");
|
| 1001 | this.registerItem(Items.poisonous_potato, "poisonous_potato");
|
| 1002 | this.registerItem(Items.map, "map");
|
| 1003 | this.registerItem(Items.golden_carrot, "golden_carrot");
|
| 1004 | this.registerItem(Items.skull, 0, "skull_skeleton");
|
| 1005 | this.registerItem(Items.skull, 1, "skull_wither");
|
| 1006 | this.registerItem(Items.skull, 2, "skull_zombie");
|
| 1007 | this.registerItem(Items.skull, 3, "skull_char");
|
| 1008 | this.registerItem(Items.skull, 4, "skull_creeper");
|
| 1009 | this.registerItem(Items.carrot_on_a_stick, "carrot_on_a_stick");
|
| 1010 | this.registerItem(Items.nether_star, "nether_star");
|
| 1011 | this.registerItem(Items.pumpkin_pie, "pumpkin_pie");
|
| 1012 | this.registerItem(Items.firework_charge, "firework_charge");
|
| 1013 | this.registerItem(Items.comparator, "comparator");
|
| 1014 | this.registerItem(Items.netherbrick, "netherbrick");
|
| 1015 | this.registerItem(Items.quartz, "quartz");
|
| 1016 | this.registerItem(Items.tnt_minecart, "tnt_minecart");
|
| 1017 | this.registerItem(Items.hopper_minecart, "hopper_minecart");
|
| 1018 | this.registerItem(Items.armor_stand, "armor_stand");
|
| 1019 | this.registerItem(Items.iron_horse_armor, "iron_horse_armor");
|
| 1020 | this.registerItem(Items.golden_horse_armor, "golden_horse_armor");
|
| 1021 | this.registerItem(Items.diamond_horse_armor, "diamond_horse_armor");
|
| 1022 | this.registerItem(Items.lead, "lead");
|
| 1023 | this.registerItem(Items.name_tag, "name_tag");
|
| 1024 | this.itemModelMesher.register(Items.banner, new ItemMeshDefinition()
|
| 1025 | {
|
| 1026 | public ModelResourceLocation getModelLocation(ItemStack stack)
|
| 1027 | {
|
| 1028 | return new ModelResourceLocation("banner", "inventory");
|
| 1029 | }
|
| 1030 | });
|
| 1031 | this.registerItem(Items.record_13, "record_13");
|
| 1032 | this.registerItem(Items.record_cat, "record_cat");
|
| 1033 | this.registerItem(Items.record_blocks, "record_blocks");
|
| 1034 | this.registerItem(Items.record_chirp, "record_chirp");
|
| 1035 | this.registerItem(Items.record_far, "record_far");
|
| 1036 | this.registerItem(Items.record_mall, "record_mall");
|
| 1037 | this.registerItem(Items.record_mellohi, "record_mellohi");
|
| 1038 | this.registerItem(Items.record_stal, "record_stal");
|
| 1039 | this.registerItem(Items.record_strad, "record_strad");
|
| 1040 | this.registerItem(Items.record_ward, "record_ward");
|
| 1041 | this.registerItem(Items.record_11, "record_11");
|
| 1042 | this.registerItem(Items.record_wait, "record_wait");
|
| 1043 | this.registerItem(Items.prismarine_shard, "prismarine_shard");
|
| 1044 | this.registerItem(Items.prismarine_crystals, "prismarine_crystals");
|
| 1045 | this.itemModelMesher.register(Items.enchanted_book, new ItemMeshDefinition()
|
| 1046 | {
|
| 1047 | public ModelResourceLocation getModelLocation(ItemStack stack)
|
| 1048 | {
|
| 1049 | return new ModelResourceLocation("enchanted_book", "inventory");
|
| 1050 | }
|
| 1051 | });
|
| 1052 | this.itemModelMesher.register(Items.filled_map, new ItemMeshDefinition()
|
| 1053 | {
|
| 1054 | public ModelResourceLocation getModelLocation(ItemStack stack)
|
| 1055 | {
|
| 1056 | return new ModelResourceLocation("filled_map", "inventory");
|
| 1057 | }
|
| 1058 | });
|
| 1059 | this.registerBlock(Blocks.command_block, "command_block");
|
| 1060 | this.registerItem(Items.fireworks, "fireworks");
|
| 1061 | this.registerItem(Items.command_block_minecart, "command_block_minecart");
|
| 1062 | this.registerBlock(Blocks.barrier, "barrier");
|
| 1063 | this.registerBlock(Blocks.mob_spawner, "mob_spawner");
|
| 1064 | this.registerItem(Items.written_book, "written_book");
|
| 1065 | this.registerBlock(Blocks.brown_mushroom_block, BlockHugeMushroom.EnumType.ALL_INSIDE.getMetadata(), "brown_mushroom_block");
|
| 1066 | this.registerBlock(Blocks.red_mushroom_block, BlockHugeMushroom.EnumType.ALL_INSIDE.getMetadata(), "red_mushroom_block");
|
| 1067 | this.registerBlock(Blocks.dragon_egg, "dragon_egg");
|
| 1068 | }
|
| 1069 |
|
| 1070 | public void onResourceManagerReload(IResourceManager resourceManager)
|
| 1071 | {
|
| 1072 | this.itemModelMesher.rebuildCache();
|
| 1073 | }
|
| 1074 | }
|
| 1075 |
|