Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GotoLink

Members
  • Joined

  • Last visited

Everything posted by GotoLink

  1. package net.PowerfulInventory.Mod; public class mod_PowerfulInventory extends BaseMod { @EventHandler public void preInit(FMLPreInitializationEvent event) { } @EventHandler public void load() { } At least, follow the tutorials to make a working mod class, please. :'(
  2. boolean RemoveBlockValid(int x, int y, int z) { if (worldObj.getBlockId(x, y, z) == Block.cobblestone.blockID) You are only removing cobblestone blocks here. You are using nextplaceblock and nextplaceblock as field, but they are not reset to false on each update tick of your entity. This means the tile entity will try to place or remove blocks, whether there are unmovable blocks or not within the line. ( if you have a gold block in your cobblestone line to remove, it will not be removed, but all others will, which looks kinda strange for a bridge) @Override public void updateEntity() { ticks++; if (ticks == 20) { ticks = 0; //ModLoader.getMinecraftInstance().thePlayer.addChatMessage(blockspushed + "/" + redstonestrength); if (blockspushed < redstonestrength) { switch(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)) { case 1: nextplaceblock = PlaceBlockValid(xCoord, yCoord, zCoord - blockspushed); break; case 2: nextplaceblock = PlaceBlockValid(xCoord, yCoord, zCoord + blockspushed); break; case 3: nextplaceblock = PlaceBlockValid(xCoord - blockspushed, yCoord, zCoord); break; case 4: nextplaceblock = PlaceBlockValid(xCoord + blockspushed, yCoord, zCoord); break; } if (nextplaceblock) { blockspushed++; } } else { switch(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)) { case 1: nextremoveblock = RemoveBlockValid(xCoord, yCoord, zCoord + blockspushed); break; case 2: nextremoveblock = RemoveBlockValid(xCoord, yCoord, zCoord - blockspushed); break; case 3: nextremoveblock = RemoveBlockValid(xCoord - blockspushed, yCoord, zCoord); break; case 4: nextremoveblock = RemoveBlockValid(xCoord + blockspushed, yCoord, zCoord); break; } if (nextremoveblock) { blockspushed--; } } } } The blocks will also start being removed as soon as blockspushed == redstonestrength. You should probably make this a case where things are stable.
  3. itemInstance.itemID can't return null. At worse, it returns 0. That is, if your custom item extends Item class.
  4. Considering forge default config files have "Items" and "Blocks" part, that you can read easily, the difficult part would be to find the price value...maybe based on the registered recipes components ?
  5. Nope, lwjgl are libraries used by Minecraft. I assume Netbeans needs to know where they are located.
  6. I can't help you more without your code.
  7. public int getRenderBlockPass() { return icons.length; } public boolean canRenderInPass(int pass) { return pass == this.getRenderBlockPass(); } There are only two passes for blocks: 0 and 1. icons.length returns 2, so nothing is rendered. What you probably want: public int pass; public int getRenderBlockPass() { return this.pass; } @Override public boolean canRenderInPass(int pass) { this.pass = pass; return true; } The block will be rendered twice, with the pass variable indicating which pass (0 or 1) is occurring. You can then use this variable in your block renderer.
  8. PlayerCapabilities, if you want to be a bit more specific on the player abilities.
  9. For all vanilla blocks, there is a clear difference between utility blocks and aesthetics ones. You should keep it that way, since TileEntity (for utility block) are supposed to be rare and have a cost on the server.
  10. //In a class: @ForgeSubscribe public void pigZombieJoinWorld(EntityJoinWorldEvent event) { if(event.entity instanceof EntityPigZombie && !event.isCanceled()) ((EntityPigZombie) event.entity).setCurrentItemOrArmor(0, new ItemStack(Item.sign)); } Register the event with: MinecraftForge.EVENT_BUS.register(new FooClazz());
  11. You would need the other mods source code.
  12. This is definitely feasible, I have it in my D:Coding folder The windows installer has an installation folder setting, for sure.
  13. If you did it, post a screenshot of your texture path in your file system, and related code. Proof is better than words. Also, it would be nice to explain yourself. Because creating a new empty folder never "mucked everything up" in the whole history of computerkind. Did you push a self-destruction button or what ?
  14. Did you ever build with redstone before coding with it ?
  15. It is modulated by randomness and bounding boxes. A village is built from a start piece, then the generator iterates over a list of weighted structure pieces. See StructureVillagePieces class.
  16. First: You have issues with entity registration. Second: You are the one throwing that exception. You should know what it means. public final int getPacketId() { if (idMap.inverse().containsKey(getClass())) { return idMap.inverse().get(getClass()).intValue(); } else { throw new RuntimeException("Packet " + getClass().getSimpleName() + " is missing a mapping!"); }
  17. You need a new Block class to represent your Fluid in still state.
  18. public GravestoneChangePacket(int facing, int type, TileEntityGravestone par2, int x, int y, int z) { this.facing = facing; this.type = type; tileEntity = (TileEntityGravestone)par2.worldObj.getBlockTileEntity(x, y, z); } public GravestoneChangePacket() { } Oh man. What am i reading ?
  19. He meant override readFromNBT and writeToNBT. (thus, those are methods) ISBRH is hydroflame way of calling ISimpleBlockRenderingHandler.
  20. Redstone will trigger neighbour block change only if its power has changed. Nothing happens until the neighbouring redstone receive power. In a more detailed sequence: -first redstone powered (tick 0) -first redstone triggers neighbour block change -second redstone receives neighbour block change -second redstone powered (tick 1) -second redstone triggers neighbour block change ... -last redstone powered (tick n) -last redstone triggers neighbour block change -your block is powered (tick n+1) To power two blocks simultaneously, you need to take the delay into account. Unless you make the first block wait for the second to be powered, or you don't need them activated at the exact same time.
  21. player.getCurrentArmor(0) This is checking the helmet slot, isn't it ?
  22. GotoLink replied to ss7's topic in Modder Support
    Nope. When calculating the new value, you just take every neighbour into account. Here is how I would think a simple power: Each powered part should have an internal power value, inputs and outputs. On a regular basis, the old value is shared between the outputs, then the power value from the inputs is added to the value left. That represents the power flow. How many inputs, outputs, and how to share, would make different pieces of the power system. A power battery : mainly outputs, initial power value=high A circuit : outputs and inputs in equal number, initial power value=0 An engine : mainly inputs, initial power value=0
  23. event.setResult(Result.ALLOW); This line says you are allowing default bucket result. I don't think you should.
  24. If you have those public static final ResourceLocation wing = new ResourceLocation(TheMod.modid, "FR/GUI/wing.png"); ... Minecraft.getMinecraft().renderEngine.func_110577_a(ForgeRevCommonProxy.wing); Your texture should be at: mcp/src/minecraft/assets/'modid'/fr/gui/wing.png

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.