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.

endershadow

Forge Modder
  • Joined

  • Last visited

Everything posted by endershadow

  1. just a something I noticed about the image you linked to, it looks like minecraft might soon have multiple terrain.png files (obviously not all named terrain.png).
  2. I think it's talking about meta-data there. just copy what I did. because I copied buildcraft.
  3. how does that relate to minecraft modding?
  4. if you look in the buildcraft source code, that's what they did and it works.
  5. remove par3Str from super(par1, par2Str, par3Str) super is used to send things to the main class. since ItemRecord doesn't need par3Str for any calculations, it doesn't need it. If you look at this file from my mod, you see that I only pass the required variables through super https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/lyoko/items/ItemLyokoFuel.java
  6. but in the code of the two types, I set the still Block ID in both of them to the stationary form's Block ID. it works fine for me.
  7. it's in net.minecraftforge.event.entity.player
  8. I think it has to do with the fact that you may have messed up the file when you edited it. I used the liquid api that's built into forge. here's my github if you want to see my code https://github.com/Code-Lyoko-Modding/CodeLyokoMod
  9. you're doing it incorrectly. if you want to see how I did it, look at my github https://github.com/Code-Lyoko-Modding/CodeLyokoMod
  10. here's what I did to get access to things in my tileentity with the gui public NAME_OF_GUI(InventoryPlayer inventoryPlayer, TILEENTITY tileEntity) { //the container is instanciated and passed to the superclass for handling super(new CONTAINER(inventoryPlayer, tileEntity)); this.ySize = 200; this.xSize = 234; VARIEABLE_NAME = tileEntity; } public TILEENTITY VARIEABLE_NAME ; and then i just access the stuff in my tileentity by doing tsc.STUFF_FROM_THE_TILEENTITY
  11. If you want to do that, save it in the tile entity and then access it in the GUI
  12. I made a multiblock structure and I was wondering if anyone knew how to make the texture change when it's a multiblock, like railcraft's coke oven. I already have a TileEntitySpecialRenderer set up, so if I need to modify that I can. I also want to set up a block that will use the texture of blocks adjacent to it. if anyone can help me with these two problems, then it will be much appreciated.
  13. This makes no sense. You're doing a reference comparison between an existing tile entity and a newly created instance of TileEntitySuperCalc. This will always be false. I think what you mean is: if (world.getBlockTileEntity(x+1, y, z+1) instanceof TileEntitySuperCalc) {... Thank you!! using instanceof worked! I also forgot about for loops, thanks for reminding me.
  14. I've already made the multiBlock work when placed and everything, but I would like to know how I can make all the blocks redirect to the master block. any help is appreciated. Also, this method is the method in the non-master blocks which are normal blocks. @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { if (player.isSneaking()) { return false; } else if(world.getBlockTileEntity(x+1, y, z+1) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x+1, y, z+1); return true; } else if(world.getBlockTileEntity(x+1, y, z) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x+1, y, z); return true; } else if(world.getBlockTileEntity(x+1, y, z-1) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x+1, y, z-1); return true; } else if(world.getBlockTileEntity(x, y, z+1) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x, y, z+1); return true; } else if(world.getBlockTileEntity(x, y, z-1) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x, y, z-1); return true; } else if(world.getBlockTileEntity(x-1, y, z+1) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x-1, y, z+1); return true; } else if(world.getBlockTileEntity(x-1, y, z) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x-1, y, z); return true; } else if(world.getBlockTileEntity(x-1, y, z-1) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x-1, y, z-1); return true; } else if(world.getBlockTileEntity(x, y-1, z) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x, y-1, z); return true; } else if(world.getBlockTileEntity(x, y-2, z) == new TileEntitySuperCalc()) { player.openGui(CodeLyoko.instance, 0, world, x, y-2, z); return true; } return false; }
  15. does anyone know what the ore dictionary name for lead is? EDIT: also does anyone know how I'd call the event handler? and would this work for checking if it's lead or not if(OreDictionary.getOreName(enti.func_92014_d().itemID) == "LEAD ORE DICTIONARY NAME")
  16. is it possible to make an ore from the ore dictionary drop a custom item? for example, lead occasionally dropping lead-210.
  17. does the shots variable tell the game what item shot the entity?
  18. I already got that to work but I can't get collision box to be correct. is there a way to make the block get the collision from model file?
  19. did you change HELMET, CHEST, LEGGINGS, and BOOTS to the corresponding armor item?
  20. You'll need to have a tickHandler to do it. put this in your main mod file proxy.registerServerTickHandler(); put this in your commonProxy public void registerServerTickHandler() { TickRegistry.registerTickHandler(new ServerTickHandler(), Side.SERVER); } and make a new file with this in it package matt.lyoko; import java.util.EnumSet; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import cpw.mods.fml.common.ITickHandler; import cpw.mods.fml.common.TickType; public class ServerTickHandler implements ITickHandler { private void onPlayerTick(EntityPlayer player) { if (player.getCurrentItemOrArmor(4) != null && player.getCurrentItemOrArmor(3) != null && player.getCurrentItemOrArmor(2) != null && player.getCurrentItemOrArmor(1) != null) { ItemStack helmet = player.getCurrentItemOrArmor(4); ItemStack chest = player.getCurrentItemOrArmor(3); ItemStack legs = player.getCurrentItemOrArmor(2); ItemStack boots = player.getCurrentItemOrArmor(1); if (helmet.getItem() == HELMET && chest.getItem() == CHEST && legs.getItem() == LEGGINGS && boots.getItem() == BOOTS) { //potion id, number of ticks, level + 1 //ticks can be at 20 because this is updated every tick player.addPotionEffect((new PotionEffect(Potion.jump.getId(), 20, 3))); } } } @Override public void tickStart(EnumSet<TickType> type, Object... tickData) { if (type.equals(EnumSet.of(TickType.PLAYER))) { onPlayerTick((EntityPlayer)tickData[0]); } } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.PLAYER, TickType.SERVER); } @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { // TODO Auto-generated method stub } @Override public String getLabel() { // TODO Auto-generated method stub return null; } }

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.