Jump to content

MineMaarten

Members
  • Posts

    169
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    http://www.minemaarten.com
  • Location
    The Netherlands
  • Personal Text
    Visit www.minemaarten.com for my mods.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MineMaarten's Achievements

Creeper Killer

Creeper Killer (4/8)

48

Reputation

  1. You're running an ancient version of PneumaticCraft, that's the problem. So updating PneumaticCraft is the way to go.
  2. We are on the same idea here , with the wiki API. I've done the text reading already, it can be found here to take a look at: https://github.com/MineMaarten/IGW-mod/blob/master/src/igwmod/InfoSupplier.java
  3. GuiScreen#initGui() should only be called when you open a GUI or when you change the resolution of your screen. This is already done for you, don't call it every render tick... To maybe solve your problem: Try rendering the textbox after you've drawn your screen. It could be that the textbox is now rendered behind your screen. this.BackGround(); this.username.drawTextBox();
  4. In that case returning true in onBlockActivated should prevent the player from placing the block.
  5. Storing in the ItemStack can either be done in 1. damagevalues or 2. NBT. As you're damagevalue probably already has been taken by how much the item is damaged you need to use NBT. And for a beginner that's quite advanced stuff.
  6. If I look back at how I've done it, it looks the same as how Xenocider described. The difference is that I'm using .ogg files instead of .wav which caused problems for me as well. So try converting the sound file to .ogg and retrying. There is a String only method, look for example at an older version of my Minesweeper Mod: https://github.com/MineMaarten/MinesweeperMod/blob/d9fddc885f6ae5cba9342fd37abe7bd35e35e6be/src/minesweeperMod/client/MinesweeperSoundHandler.java https://github.com/MineMaarten/MinesweeperMod/blob/d9fddc885f6ae5cba9342fd37abe7bd35e35e6be/src/minesweeperMod/common/ItemMineDetector.java
  7. You also might have a look at my code to display tutorial messages from my Minesweeper Mod: TutorialHandler.java, when called onUpdate(), it will send messages if a certain timer runs out: https://github.com/MineMaarten/MinesweeperMod/blob/master/src/minesweeperMod/common/TutorialHandler.java MinesweeperTickHandler.java, which manages the TutorialHandlers and calls the onUpdate() every world tick: https://github.com/MineMaarten/MinesweeperMod/blob/master/src/minesweeperMod/common/MinesweeperTickHandler.java
  8. In 1.5 the folder was called 'mods' instead of 'assets', but the principle mentioned by Xenocider is the same. I'm not 100% this was also being applied for sounds by then, but you can at least try it.
  9. The rotations of the blocks mentioned by you are all saved in a thing what's called block metadata (and with those many more blocks). Also the difference between top/bottom halfslabs and stairs being upside down is saved in metadata. So I suggest looking up metadata (there's much to find on this topic).
  10. Or you could create the entity and inject an altered NBT tag in the Entity. Something like: CustomEntity entity = new CustomEntity(worldObj); NBTTagCompound tag = new NBTTagCompound(); entity.writeEntityToNBT(tag);//create the base tag tag.setShort("Health", (short)10);//alter the tag, for instance here the health is changed. Bit devious but it's an example. entity.readEntityFromNBT(tag);//inject the entity with the altered tag. worldObj.spawnEntityInWorld(entity);
  11. So apparently updateSides() is only called on the server side. And no you shouldn't have gotten an error or something because you're calling a @SideOnly(Side.CLIENT) annotated method because that only will be the case if you test it on a dedicated server instead of the internal SSP one. You'll then see that just the line @SideOnly(Side.CLIENT) public boolean connect[] = {false, false, false, false, false, false}; will throw an exception as the SideOnly notation only applies to the field and not it's initializer.
  12. @Override public Packet getDescriptionPacket(){ NBTTagCompound tag = new NBTTagCompound(); writeToNBT(tag); return new Packet132TileEntityData(xCoord, yCoord, zCoord, 0, tag); } @Override public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt){ readFromNBT(pkt.data); } public void sendDescriptionPacket(){ PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 64D, worldObj.provider.dimensionId, getDescriptionPacket()); } sendDescriptionPacket() is a 'homemade' method with which you can send the nbt packet to the client whenever you want. The fewer packets you send the better though. So the best that you can do is simulating the same behaviour on the client and on the server and only send a packet when you know the client will be desynched.
  13. diesieben means if(getStackInSlot(x).stackSize <= 0) setInventorySlotContents(x, null);
  14. ScaledResolution has your answer: Minecraft minecraft = Minecraft.getMinecraft(); ScaledResolution sr = new ScaledResolution(minecraft.gameSettings, minecraft.displayWidth, minecraft.displayHeight); int y = sr.getScaledHeight(); //gives the screen height.
  15. Create (add, not replace) your own AI class that acceps an ItemStack?
×
×
  • Create New...

Important Information

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