Jump to content

StrangeOne101

Members
  • Posts

    48
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    Hello there.

StrangeOne101's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. As Draco said, you need to call setTextureName in order for this.getTextureName() to get the right texture. Use this.setTextureName(YourMod.modID + ":yourCustomCakeTexture"); to set the texture, but be sure not to include .png on the end. Forge does that by itself
  2. Haha, hey dude I tried what you said but it seemed to make everything stop working completely. Still was stuck so I posted here in hope of getting a solution. As diesieben said, there may not be a way without some really clever stuff so I might just settle on testing for TileEntities and some other blocks. Thanks anyway.
  3. That means that it will not spawn when they right click on any block. So if they click on grass even, it won't spawn. I don't want that. I know that. I don't have a certain block I'm trying to check for though. I'm trying to check for all blocks that interact only so I can spawn my entity if it doesn't interact.
  4. As I said, it is causing me issues as it is still spawning when the player is interacting with a block like crafting tables, chests, doors, etc. I don't want it to spawn when they interact with blocks like these, I want it like the item interact code.
  5. The item is can be any item that fits the standard of what I need. I don't have an item file for it.
  6. I'm trying to spawn a custom entity when a player right clicks with an item. The only thing is that it still spawns when I interact with blocks like crafting tables, chests, etc
  7. I need an event that either triggers on right click AFTER block interaction or for some way to do that with the PlayerInteractEvent. I want it to be like the onItemUse method in items that triggers after block interaction or if the player is holding shift. I did originally have the code in an item, but the item is meant to override a vanilla item with a new function and that's not possible with 1.7. The following code it what I currently have for my PlayerInteractEvent. I've tried manually triggering the activation then canceling the event after (to prevent activation from happening twice, too) but it seems to cause other problems like no more chest animations or sound. If anyone could help me with this, that'd be great. Thanks Code: @SubscribeEvent public void onRightClick(PlayerInteractEvent e) { if (e.isCanceled()) { return; } if (e.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR ) { this.throwBrickEvent(e.entityPlayer); //New item function. Just easier in once line and place. } else if (e.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK && e.entityPlayer.getHeldItem() != null && this.canThrow(e.entityPlayer.getHeldItem())) { Block block = e.world.getBlock(e.x, e.y, e.z); if (!block.onBlockActivated(e.world, e.x, e.y, e.z, e.entityPlayer, e.face, e.x, e.y, e.z)) //Don't know what the last 3 parameters are { e.setResult(Result.DEFAULT); this.throwBrickEvent(e.entityPlayer); } e.setCanceled(true); } }
  8. The thing is, I don't really want to create a whole new crafting table and recipes. I've thought about it but it doesn't suit my mod. Thanks anyway.
  9. I know that this is an old post but I'm still having this problem. Hopefully I'm not breaking any rules by doing this, but please let me know if I am. It's just a real serious problem and I can't seem to find any solution.
  10. Hmm, well I don't know, bud. Sorry.
  11. No, just make sure your doing it client side. That's what the if (!world.isRemote) is for. If isRemote returns true, it's running the code from the server (it runs from both client and server though). So the code only runs when the client runs the code. And I have no idea about GUIs. There's bound to be a method for when you close them though.
  12. Only modify blocks from the client. if (!world.isRemote) { world.editBlocks = true; world.setBlockWithNotify(x, y, z, Block.stone.blockID); world.editBlocks = false; }
  13. More infomation: I redid the code, same result. I follow thistutorial. http://www.minecraftforum.net/topic/1797143-152-16-forge-dimension-tutorial-multi-biome-dimension-ore-gen-basic-house-gen-tree-gen-skyrenderer-githubsrc-code/ And a screenshot is attached as well, showing the terrain and null biome. http://i1327.photobucket.com/albums/u678/StrangeOne101/2013-08-18_124724_zpsb7a6db9f.png Cheers.
  14. Hello all. Whenever I have tried to make a simple new dimension with even just one biome, it never ever generates. All I see is stone, and the odd patches of dirt. It seems that the biome hasn't been generated, but the world has. And when I look in F3, the biome is null. I would post the huge amount of code here, but when I tried to fix it, I kind of screwed it up and now it doesn't even work. Any help on the situation would be great. Thanks.
  15. If you make a new instance of a DamageSource, you can add a custom death message for it via the LanguageRegistry. DamageSourceSword class: In your mod file, preferably in @PreInit():
×
×
  • Create New...

Important Information

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