Everything posted by endershadow
-
[SOLVED]sprite problem
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).
-
Updating a liquid block turns it into another
I think it's talking about meta-data there. just copy what I did. because I copied buildcraft.
-
How to make the Machine beep?
how does that relate to minecraft modding?
-
Updating a liquid block turns it into another
if you look in the buildcraft source code, that's what they did and it works.
-
How to change Item's constructor?
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
-
Updating a liquid block turns it into another
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.
-
New Iron Bucket
it's in net.minecraftforge.event.entity.player
-
Updating a liquid block turns it into another
what do you mean?
-
Updating a liquid block turns it into another
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
-
Possible to use NBTTagCompound in a Gui
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
-
Possible to use NBTTagCompound in a Gui
let me see your code
-
Possible to use NBTTagCompound in a Gui
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
-
Possible to use NBTTagCompound in a Gui
it shouldn't.
-
Rendering MultiBlock Structure/Block texture changing based on adjacent blocks
anyone?
-
Possible to use NBTTagCompound in a Gui
If you want to do that, save it in the tile entity and then access it in the GUI
-
Rendering MultiBlock Structure/Block texture changing based on adjacent blocks
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.
-
MultiBlock
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.
-
MultiBlock
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; }
-
Ore Dictionary
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")
-
Ore Dictionary
is it possible to make an ore from the ore dictionary drop a custom item? for example, lead occasionally dropping lead-210.
-
Help with Rendering please
does the shots variable tell the game what item shot the entity?
-
Custom block render showing up as invisible.
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?
- Potion Effect on armor
-
Potion Effect on armor
did you change HELMET, CHEST, LEGGINGS, and BOOTS to the corresponding armor item?
-
Potion Effect on armor
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; } }
IPS spam blocked by CleanTalk.