Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by grand_mind1

  1. Oh, sorry, forgot to add that to my previous reply. I've already done this. @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION, guiFactory = Reference.GUI_FACTORY_CLASS, dependencies = "after:ThermalExpansion;after:Baubles")
  2. Hey, thanks for the reply. I tried that, but I must be doing something wrong. The game doesn't seem to recognize the recipe. GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.BlockPoweredAnvil), " c ", "iai", 'c', new ItemStack(GameRegistry.findItem("ThermalExpansion", "blockCell")), 'i', new ItemStack(Items.iron_ingot), 'a', new ItemStack(Blocks.anvil));
  3. Hey, I read a couple old topics on this subject, but I didn't really understand them so sorry if this is repetitive. I've created a block that uses RF with the CoFH API and I want to add a recipe for it that uses an energy cell from Thermal Expansion. I'm not sure where to even start All help is appreciated. Thanks!
  4. Oh, that's a great idea! I looked into it and got it working! Thanks! If anyone wants to know how I did it, I took this code from EntityThrowable(the class ender pearl extends): this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * f); this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * f); this.motionY = (double)(-MathHelper.sin((this.rotationPitch + this.func_70183_g()) / 180.0F * (float)Math.PI) * f); If I read it correctly, this is how the game sets the motion of any entity that is being thrown. Then, all I had to do was change it up to work with my own code: double motionX = (double)(-MathHelper.sin(entityPlayer.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(entityPlayer.rotationPitch / 180.0F * (float)Math.PI) * 1.5F); double motionZ = (double)(MathHelper.cos(entityPlayer.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(entityPlayer.rotationPitch / 180.0F * (float)Math.PI) * 1.5F); double motionY = (double)(-MathHelper.sin((entityPlayer.rotationPitch + 0F) / 180.0F * (float)Math.PI) * 1.5F); entityPlayer.addVelocity(motionX, motionY, motionZ); Using a multiplier of 0.4, like in the original ender pearl code, wasn't quite enough to get the boost I liked, so I chaned it to 1.5. Thanks!
  5. Well, I don't want to set the x, y, and z, I want to actually quickly move him there(which can be done with addVelocity()). Also, I don't think ForgeDirection will work because what if the player is supposed to be boosted south-east? Obviously, to the game, they are facing one or the other and will choose one.
  6. Hey, title pretty much says it all. I want to boost the player in the direction he is facing. I think I can do the boost part with addVelocity(), however I'm not sure what values to pass it so the player is boosted in the correct direction. All help is appreciated. Thanks!
  7. Thanks for your help, but I I've done something wrong. My items are now named "Unnamed" with the following code in my ItemBlock class: @Override public String getItemStackDisplayName(ItemStack itemStack) { return itemStack.getDisplayName().replace("@", StatCollector.translateToLocal("pandm.color" + itemStack.getItemDamage())); } This is my lang file:
  8. I'm probably misunderstanding you, but doesn't that require me to somehow get the localized name of the block, because I need to replace characters in the localized name?
  9. Hi, I'm trying to add some extra wool into the game. I want to set the ItemBlock and Block's name based on what color it is (e.g. Black Wool instead of just Wool). The only way I can think of doing this is to have different unlocalized names for each color, but this seems quite inefficient. Is there a better way I can do this? Thanks!
  10. Um no, I have both. The TileEntitySpecialRenderer is used to render the block in the world and ItemRender is used to render it in an inventory, right? I've included that second class in my previous reply if you need to look at it. EDIT: What do you mean by overriding the whole render code in IItemRenderer?
  11. Thanks for your reply! I tried this, but I think I either implemented it incorrectly or I need extra code for it to work with my ItemRenderer for the block. My game crashes with the following report: http://pastebin.com/b1V6yaU8 This is that class:
  12. Hi, I'm trying to make my block with a TileEntitySpecialRenderer face the player when he places it. I've looked into the furnace and anvil code to try to replicate it. At the moment, I'm not sure if it's the actual block not facing the correct direction or the model. I think it is probably the model, because the bounding box seems to change the correct orientation even when the model does not. My Block Class: Some screenshots to hopefully better explain what I'm talking about: http://puu.sh/eI4Zr/e42a09109e.jpg http://puu.sh/eI52X/7306221137.jpg The models on both are facing the same direction, however the bounding box is different depending on which direction I was facing when I placed it. If you need to see any other classes, I can provide the code for them. Any help is appreciated! Thanks!
  13. Hey, title pretty much says it all. I want to use isItemEqual() in my container, but I need it to return true for any item damage. At the moment, it only returns true if the item is not damaged.
  14. Hey again, I have another quick question. I thought I could figure it out on my own, but it apparently not. Where do I get the value from the last tick? someValueLastTick in your example.
  15. Thanks so much! I'm a bit confused on how to get the old fluidstack and copy it. I tried this: private FluidStack oldWater = coffeeMaker.getWaterTank().getFluid().copy(); but it crashed with this error: Ticking memory connection java.lang.NullPointerException: Ticking memory connection at com.darichey.ACOJ.tileentity.containers.ContainerCofffeeMaker.<init>(ContainerCofffeeMaker.java:105) at com.darichey.ACOJ.handler.GuiHandler.getServerGuiElement(GuiHandler.java:18) at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241) at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) at com.darichey.ACOJ.block.BlockCoffeeMaker.onBlockActivated(BlockCoffeeMaker.java:45) at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:409) at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:593) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) I'm sure I just misunderstood something.
  16. Ah ok, sorry. Man do I feel dumb, saw the mistake in my writeToNBT method right away Thanks for the help with that. So now back to the original question... In order to sync my fluid amounts, I should override detectAndSendChanges() and addCraftingToCrafters() in my Container class. Would you mind explaining how to use these a bit more? I didn't really understand what you meant with the lastTick field. I've also not done anything with packets whatsoever. Do you know of a good tutorial I could read to gain an understanding of how to use them? Thanks!
  17. Ah ok, I'll take a look at that. Thanks This is the container before I relog: http://puu.sh/d8fwG/1c710cba87.png After I relog, it looks like this: http://puu.sh/d8fyT/9fb200c779.png The bucket is now gone.
  18. But I want my $200! D: I thought I could get around that problem by returning a new instance of the tile entity in createNewTileEntity(). Suppose not. So now I have two questions: 1) So without the instance, how can I get the current instance of the tile entity for getDrops()? 2) Removing the instance, did not allow for the tile entity to sync properly. The items still do not appear to save in the container. Is there something else I must do?
  19. Again, I'm going off the of the GUI so I assumed it was a problem with syncing again. If I understand you correctly, I open it just by right-clicking. This is the block class where I do that: It has pahimar's name code that I know you love Haven't gotten around to fixing that yet.
  20. Yeah, that's what I thought. Would you mind taking a look at my container class?
  21. Oh ok, thanks didn't know that. I think I worded my last post strangely. I was saying that at the moment, with no changes, the items in the inventory are NOT synchronized.
  22. In your ModItems class https://github.com/BackWoodsMod/TheBackWoods-1.8/blob/master/src/main/java/com/chaka/thebackwoods/init/ModItems.java#L16 Replace "modid:amethystItem" with Reference.MOD_ID + ":amethystItem" I also think you need to rename test.json to amethystItem.json. Also, on an unrelated note, I believe items and blocks should be initialized in the preInit() method, not init().
  23. This should help: http://www.minecraftforge.net/forum/index.php/topic,24263.0.html
  24. Hey, thanks for the solution. After doing a bit of research on your suggestion, I found that I could properly sync my tank data by using getDescriptionPacket() and onDataPacket(). However, I believe I still need your solution for the actual container. I have a couple questions, if you don't mind. While looking at the code for detectAndSendChanges() and addCraftingToCrafters(), I saw that the default methods in the Container class already should do what I want them to. That is, of course, if I understand the methods fully. Is there a reason why these don't seem to be working?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.