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.

American2050

Members
  • Joined

Everything posted by American2050

  1. I can read on the Wiki that it says: However on the practice, this event is firing all the time an achievement related event happens, and not when the achievement was really obtained. For example, each time the player opens the inventory, this even triggers. Shouldn't this only happen if opening the inventory was the first time and player receives that achievement? At least that's what I understand from reading the description.
  2. Ohh I see. Thanks. I switched to Default as one was returning 29 and the other 34 I believe, but maybe it is because I was checking against the wrong on Gonna give it a try again. However from the KeyMonitor it's nice, as I can now check against Left Control, and it doesn't matter if the Key is assigned to sprint also, so it doesn't cause a key conflict.
  3. Tried that way, but it keeps triggering until another key is pressed. if(Keyboard.getEventKey() == MyKeyBindings.toggleWater.getKeyCodeDefault() && MyKeyBindings.toggleWater.getKeyModifier().isActive()){ isLocked = !isLocked; } I found a fix from my KeyMonitor: if(Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)){ WateringDongle.isLocked = !WateringDongle.isLocked; } And this method doesn't trigger to fast, so unless the player keeps holding the key for a long time, it will toggle false/true really well.
  4. Ohh ok. And do I have to declare a Key on the Controls also, to give the players the ability to change the key that triggers this? I guess it would be a good practice, as default it would be Control, that, as we all know, it's assigned to Sprint. I don't want to cause a Key Conflict
  5. When you say "Subscribe" to KeyInputEvent, you mean like subscribing a Forge Event?
  6. This is kinda off topic to ask on the Modder Support Forum, so I ask here. I have an item that runs a code while player holds right click on it. I want to change the state of a boolean when the player presses Control key. The problem I have if that checking with something like this: if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)) { this.isLocked = !this.isLocked; } Will make the boolean isLocked to switch from true to false constantly while the key is pressed. Is there a way to make it switch just once until the next time Control is pressed? Thanks.
  7. The chance is running at that step on the loops because, when the chance is 1, I don't need to update the 3x3x3 blocks in the area, but only the 3 on the Y level that are in X/Z coordinates where chance came as "true" (=1) chances is random between 1 and 2 in this example. But I run this code, because I noticed since the day I made this code, that the crops on the west were always growing faster than the ones on the east, so I knew something was wrong. However what I did now, is kinda what you suggested, only run the loop and update the 3x3x3 area at once when chance = 1. It makes crops grow faster and I wont have this "unevenness" problem. The only problem I have now is that when causing updates around cactus and sugarcanes, they all grow at once, but I can live with that
  8. So I have a code that runs 2 loops, one to move on the X axis and other to move on the Z axis. The idea is to check a 3x3 area around the block that triggers the call. Once I do that, I generator a random number, and if that number is 1, then I cause block updates for the 3 blocks on the Y axis at that coordinates. Problem is that for some reason that I don't understand, than random number is 1 most time when the X axis is -1 in relation to the time it's 1 when the X axis is 1. And kinda the same on the Z axis. Code: for(int xAxis=-1;xAxis<=1;xAxis++){ for(int zAxis=-1;zAxis<=1;zAxis++){ int chance = Stuff.randInt(1, chances); if (chance==1){ if(xAxis == -1){ menosUnoX++; } if(xAxis == 0){ ceroX++; } if(xAxis == 1){ masUnoX++; } if(zAxis == -1){ menosUnoZ++; } if(zAxis == 0){ ceroZ++; } if(zAxis == 1){ masUnoZ++; } System.out.println("xAxis is -1: " + menosUnoX + " times - 0: " + ceroX + " times - 1: " + masUnoX + " times"); System.out.println("zAxis is -1: " + menosUnoZ + " times - 0: " + ceroZ + " times - 1: " + masUnoZ + " times"); for(int yAxis=-1;yAxis<=1;yAxis++){ Block checkBlock = world.getBlockState(pos.add(xAxis, yAxis, zAxis)).getBlock(); world.scheduleBlockUpdate(pos.add(xAxis, yAxis, zAxis), checkBlock, 0, 1); } return EnumActionResult.SUCCESS; } } } Log after 200 times been the random number 1 when the xAxis was -1: xAxis is -1: 200 times - 0: 89 times - 1: 53 times zAxis is -1: 148 times - 0: 100 times - 1: 94 times
  9. Should I have asked how also? Before you say yes... Let's ask... How can I achieve this?
  10. Is it possible to have a string and run it as a Command Line the same way it would run from a Command Block, but do it from inside our mod? Thanks for the help.
  11. Simple question, may sound stupid, but for someone like me, that really doesn't understand all the "Infrastructure" behind Forge. What's the work that the Forge Team "does / have to do" each time a new version of Minecraft comes out. PS: Also, what or how someone with not much knowledge, could help to the project. Sorry to ask this that may be obvious to a lot of people, but I guess it's a good chance for a lot of us to know and understand and at the same time appreciate better the work that Forge Team does.
  12. I have a mod that works either in 1.9.4 and 1.10 The only thing I do when I move it from one environment to the other is change the version of the mod and minecraft version on the reference files on mcmod.info and build.gradle What would be a good way to compile the mod just one and distribute that as compatible with both versions? I see some mods do that, but where should I do that, on the 1.9.4 environment or in the 1.10? PS: Would I still have to open my mod in both devs environments to see no errors show up?
  13. Ok, gonna implement ModelLoader for my items also and try it again Will let you know if that fixes it. Thanks you once again. PS: Solved and changed the title to solved. Thanks 100000 for helping with this, I feel like the code if way cleaner now, and for sure more efficient. I was something I knew I had to do at some point
  14. [[As I post this, I notice I'm still calling it from 'init'.... Could that be the problem?]] On Main class: @SidedProxy(clientSide = ModInfo.CLIENT_PROXY_CLASS, serverSide = ModInfo.SERVER_PROXY_CLASS) public static IProxy proxy; @EventHandler public void init(FMLInitializationEvent event) { //Register Renders - This will call the right Side - Check ClientProxy for Items and Blocks render registration proxy.registerRender(); proxy.otherInits(); } And on ClientProxy: @Override public void registerRender() { //Register Renders on Client Side Only ModItems.registerRenders(); ModBlocks.registerRenders(); ModCompressedBlocks.registerRenders(); } PS: Right now, all that works, but because I'm using the old method, when I switch to the ModelLoader that is commented, it doesn't work. public static void registerRenders() { registerRender(COMP_ROTFLESH_1); registerRender(COMP_ROTFLESH_2); registerRender(COMP_ROTFLESH_3); registerRender(COMP_ROTFLESH_4); registerRender(COMP_ROTFLESH_5); registerRender(COMP_ROTFLESH_6); registerRender(COMP_ROTFLESH_7); registerRender(COMP_ROTFLESH_; registerRender(COMP_ROTFLESH_9); } public static void registerRender(CompressBlock block){ RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); renderItem.getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName().toString(), "inventory")); // ModelResourceLocation modelLocation = new ModelResourceLocation(block.getRegistryName(), "inventory"); // ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), block.getMetaFromState(block.getDefaultState()), modelLocation); }
  15. Clearly I did something wrong, as it now crashes when trying to launch Server and not Client. java.lang.NoClassDefFoundError: net/minecraftforge/client/model/ModelLoader at com.mramericanmike.mikedongles.init.ModCompressedBlocks.registerBlock(ModCompressedBlocks.java:68) ~[bin/:?] So yes, clearly it's not ok to call it outside the ClientSide, but dunno why nothing renders when I call it from ClientSide. Gonna do more testing or revert to my old method in the meanwhile
  16. Thanks a lot, and thanks for the patience. I hope I didn't remove to much code Well, that's why I called the registerRenders only from ClientProxy but using this new way to register the textures, apparently didn't work that way. So, finally, now the code got reduced to this. Huge different, way more cleaner, and I hope it's ok At least it works, that's important. public class ModCompressedBlocks { public static final CompressBlock COMP_ROTFLESH_1 = new CompressBlock("rotten_flesh_1"); public static final CompressBlock COMP_ROTFLESH_2 = new CompressBlock("rotten_flesh_2"); public static final CompressBlock COMP_ROTFLESH_3 = new CompressBlock("rotten_flesh_3"); public static final CompressBlock COMP_ROTFLESH_4 = new CompressBlock("rotten_flesh_4"); public static final CompressBlock COMP_ROTFLESH_5 = new CompressBlock("rotten_flesh_5"); public static final CompressBlock COMP_ROTFLESH_6 = new CompressBlock("rotten_flesh_6"); public static final CompressBlock COMP_ROTFLESH_7 = new CompressBlock("rotten_flesh_7"); public static final CompressBlock COMP_ROTFLESH_8 = new CompressBlock("rotten_flesh_8"); public static final CompressBlock COMP_ROTFLESH_9 = new CompressBlock("rotten_flesh_9"); public static final CompressBlock COMP_GUNPOWDER_1 = new CompressBlock("gunpowder_1"); public static final CompressBlock COMP_GUNPOWDER_2 = new CompressBlock("gunpowder_2"); public static final CompressBlock COMP_GUNPOWDER_3 = new CompressBlock("gunpowder_3"); public static final CompressBlock COMP_GUNPOWDER_4 = new CompressBlock("gunpowder_4"); public static final CompressBlock COMP_GUNPOWDER_5 = new CompressBlock("gunpowder_5"); public static final CompressBlock COMP_GUNPOWDER_6 = new CompressBlock("gunpowder_6"); public static final CompressBlock COMP_GUNPOWDER_7 = new CompressBlock("gunpowder_7"); public static final CompressBlock COMP_GUNPOWDER_8 = new CompressBlock("gunpowder_8"); public static final CompressBlock COMP_GUNPOWDER_9 = new CompressBlock("gunpowder_9"); //This gets called on MainClass preInit public static void init() { registerBlock(COMP_ROTFLESH_1); registerBlock(COMP_ROTFLESH_2); registerBlock(COMP_ROTFLESH_3); registerBlock(COMP_ROTFLESH_4); registerBlock(COMP_ROTFLESH_5); registerBlock(COMP_ROTFLESH_6); registerBlock(COMP_ROTFLESH_7); registerBlock(COMP_ROTFLESH_; registerBlock(COMP_ROTFLESH_9); registerBlock(COMP_GUNPOWDER_1); registerBlock(COMP_GUNPOWDER_2); registerBlock(COMP_GUNPOWDER_3); registerBlock(COMP_GUNPOWDER_4); registerBlock(COMP_GUNPOWDER_5); registerBlock(COMP_GUNPOWDER_6); registerBlock(COMP_GUNPOWDER_7); registerBlock(COMP_GUNPOWDER_; registerBlock(COMP_GUNPOWDER_9); } public static void registerBlock(CompressBlock block) { GameRegistry.register(block); GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName())); ModelResourceLocation modelLocation = new ModelResourceLocation(block.getRegistryName(), "inventory"); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), block.getMetaFromState(block.getDefaultState()), modelLocation); } }
  17. setCustomModelResourceLocation wants a metadata. but I derped, I called the wrong method I guess I could just put 0 there and it should do. Thanks for the tip, gonna try to fix it and see how it goes. Is it ok to call it just from ClientProxy for the render right?
  18. Thanks you very much. I kinda got the idea, and now it looks way way cleaner. Still confused about how to use the ModelLoader.setCustomModelResourceLocation well, I kinda know how to use it, but I must be either missing something very basic, or doing something wrong, as when trying it, textures don't show. Tried calling that from ClientProxy, and from preInit and nothing. Maybe I'm messing the structure on where it's looking for the textures. Here is what I did (Commented what didn't worked) as it is not, it works and blocks renders. public class ModCompressedBlocks { public static final CompressBlock COMP_ROTFLESH_1 = new CompressBlock("rotten_flesh_1"); public static final CompressBlock COMP_ROTFLESH_2 = new CompressBlock("rotten_flesh_2"); public static final CompressBlock COMP_ROTFLESH_3 = new CompressBlock("rotten_flesh_3"); public static final CompressBlock COMP_ROTFLESH_4 = new CompressBlock("rotten_flesh_4"); public static final CompressBlock COMP_ROTFLESH_5 = new CompressBlock("rotten_flesh_5"); public static final CompressBlock COMP_ROTFLESH_6 = new CompressBlock("rotten_flesh_6"); public static final CompressBlock COMP_ROTFLESH_7 = new CompressBlock("rotten_flesh_7"); public static final CompressBlock COMP_ROTFLESH_8 = new CompressBlock("rotten_flesh_8"); public static final CompressBlock COMP_ROTFLESH_9 = new CompressBlock("rotten_flesh_9"); public static final CompressBlock COMP_GUNPOWDER_1 = new CompressBlock("gunpowder_1"); public static final CompressBlock COMP_GUNPOWDER_2 = new CompressBlock("gunpowder_2"); public static final CompressBlock COMP_GUNPOWDER_3 = new CompressBlock("gunpowder_3"); public static final CompressBlock COMP_GUNPOWDER_4 = new CompressBlock("gunpowder_4"); public static final CompressBlock COMP_GUNPOWDER_5 = new CompressBlock("gunpowder_5"); public static final CompressBlock COMP_GUNPOWDER_6 = new CompressBlock("gunpowder_6"); public static final CompressBlock COMP_GUNPOWDER_7 = new CompressBlock("gunpowder_7"); public static final CompressBlock COMP_GUNPOWDER_8 = new CompressBlock("gunpowder_8"); public static final CompressBlock COMP_GUNPOWDER_9 = new CompressBlock("gunpowder_9"); //This gets called on MainClass preInit public static void init() { registerBlock(COMP_ROTFLESH_1); registerBlock(COMP_ROTFLESH_2); registerBlock(COMP_ROTFLESH_3); registerBlock(COMP_ROTFLESH_4); registerBlock(COMP_ROTFLESH_5); registerBlock(COMP_ROTFLESH_6); registerBlock(COMP_ROTFLESH_7); registerBlock(COMP_ROTFLESH_; registerBlock(COMP_ROTFLESH_9); registerBlock(COMP_GUNPOWDER_1); registerBlock(COMP_GUNPOWDER_2); registerBlock(COMP_GUNPOWDER_3); registerBlock(COMP_GUNPOWDER_4); registerBlock(COMP_GUNPOWDER_5); registerBlock(COMP_GUNPOWDER_6); registerBlock(COMP_GUNPOWDER_7); registerBlock(COMP_GUNPOWDER_; registerBlock(COMP_GUNPOWDER_9); } //This gets called on ClientPoxy public static void registerRenders() { registerRender(COMP_ROTFLESH_1); registerRender(COMP_ROTFLESH_2); registerRender(COMP_ROTFLESH_3); registerRender(COMP_ROTFLESH_4); registerRender(COMP_ROTFLESH_5); registerRender(COMP_ROTFLESH_6); registerRender(COMP_ROTFLESH_7); registerRender(COMP_ROTFLESH_; registerRender(COMP_ROTFLESH_9); registerRender(COMP_GUNPOWDER_1); registerRender(COMP_GUNPOWDER_2); registerRender(COMP_GUNPOWDER_3); registerRender(COMP_GUNPOWDER_4); registerRender(COMP_GUNPOWDER_5); registerRender(COMP_GUNPOWDER_6); registerRender(COMP_GUNPOWDER_7); registerRender(COMP_GUNPOWDER_; registerRender(COMP_GUNPOWDER_9); } public static void registerBlock(CompressBlock block) { GameRegistry.register(block); GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName())); // ModelResourceLocation modelLocation = new ModelResourceLocation(block.getRegistryName(), "inventory"); // ModelLoader.setCustomModelResourceLocation(new ItemBlock(block), block.getIdFromBlock(block), modelLocation); } public static void registerRender(Block block) { RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); renderItem.getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName().toString(), "inventory")); // ModelResourceLocation modelLocation = new ModelResourceLocation(block.getRegistryName(), "inventory"); // ModelLoader.setCustomModelResourceLocation(new ItemBlock(block), block.getIdFromBlock(block), modelLocation); } }
  19. I would like to know what would be a cleaner way to register blocks and itemblocks. I'm doing it in not such efficient way and it's always something that I leave for later, but now that I need to register a bunch of blocks, I guess it's time to ask, how to optimize this. Here is an example of what I'm doing. I think I could somehow "loop" this using a for, but not sure what changes I should implement first. public class ModCompressedBlocks { public static final CompressBlock COMP_ROTFLESH_1 = new CompressBlock("rotten_flesh_1"); public static final ItemBlock COMP_ROTFLESH_1_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_1).setRegistryName(COMP_ROTFLESH_1.getRegistryName()); public static final CompressBlock COMP_ROTFLESH_2 = new CompressBlock("rotten_flesh_2"); public static final ItemBlock COMP_ROTFLESH_2_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_2).setRegistryName(COMP_ROTFLESH_2.getRegistryName()); public static final CompressBlock COMP_ROTFLESH_3 = new CompressBlock("rotten_flesh_3"); public static final ItemBlock COMP_ROTFLESH_3_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_3).setRegistryName(COMP_ROTFLESH_3.getRegistryName()); public static final CompressBlock COMP_ROTFLESH_4 = new CompressBlock("rotten_flesh_4"); public static final ItemBlock COMP_ROTFLESH_4_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_4).setRegistryName(COMP_ROTFLESH_4.getRegistryName()); public static final CompressBlock COMP_ROTFLESH_5 = new CompressBlock("rotten_flesh_5"); public static final ItemBlock COMP_ROTFLESH_5_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_5).setRegistryName(COMP_ROTFLESH_5.getRegistryName()); public static final CompressBlock COMP_ROTFLESH_6 = new CompressBlock("rotten_flesh_6"); public static final ItemBlock COMP_ROTFLESH_6_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_6).setRegistryName(COMP_ROTFLESH_6.getRegistryName()); public static final CompressBlock COMP_ROTFLESH_7 = new CompressBlock("rotten_flesh_7"); public static final ItemBlock COMP_ROTFLESH_7_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_7).setRegistryName(COMP_ROTFLESH_7.getRegistryName()); public static final CompressBlock COMP_ROTFLESH_8 = new CompressBlock("rotten_flesh_8"); public static final ItemBlock COMP_ROTFLESH_8_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_.setRegistryName(COMP_ROTFLESH_8.getRegistryName()); public static final CompressBlock COMP_ROTFLESH_9 = new CompressBlock("rotten_flesh_9"); public static final ItemBlock COMP_ROTFLESH_9_ITEM = (ItemBlock) new ItemBlock(COMP_ROTFLESH_9).setRegistryName(COMP_ROTFLESH_9.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_1 = new CompressBlock("gunpowder_1"); public static final ItemBlock COMP_GUNPOWDER_1_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_1).setRegistryName(COMP_GUNPOWDER_1.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_2 = new CompressBlock("gunpowder_2"); public static final ItemBlock COMP_GUNPOWDER_2_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_2).setRegistryName(COMP_GUNPOWDER_2.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_3 = new CompressBlock("gunpowder_3"); public static final ItemBlock COMP_GUNPOWDER_3_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_3).setRegistryName(COMP_GUNPOWDER_3.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_4 = new CompressBlock("gunpowder_4"); public static final ItemBlock COMP_GUNPOWDER_4_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_4).setRegistryName(COMP_GUNPOWDER_4.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_5 = new CompressBlock("gunpowder_5"); public static final ItemBlock COMP_GUNPOWDER_5_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_5).setRegistryName(COMP_GUNPOWDER_5.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_6 = new CompressBlock("gunpowder_6"); public static final ItemBlock COMP_GUNPOWDER_6_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_6).setRegistryName(COMP_GUNPOWDER_6.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_7 = new CompressBlock("gunpowder_7"); public static final ItemBlock COMP_GUNPOWDER_7_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_7).setRegistryName(COMP_GUNPOWDER_7.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_8 = new CompressBlock("gunpowder_8"); public static final ItemBlock COMP_GUNPOWDER_8_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_.setRegistryName(COMP_GUNPOWDER_8.getRegistryName()); public static final CompressBlock COMP_GUNPOWDER_9 = new CompressBlock("gunpowder_9"); public static final ItemBlock COMP_GUNPOWDER_9_ITEM = (ItemBlock) new ItemBlock(COMP_GUNPOWDER_9).setRegistryName(COMP_GUNPOWDER_9.getRegistryName()); public static void init() { GameRegistry.register(COMP_ROTFLESH_1);GameRegistry.register(COMP_ROTFLESH_1_ITEM); GameRegistry.register(COMP_ROTFLESH_2);GameRegistry.register(COMP_ROTFLESH_2_ITEM); GameRegistry.register(COMP_ROTFLESH_3);GameRegistry.register(COMP_ROTFLESH_3_ITEM); GameRegistry.register(COMP_ROTFLESH_4);GameRegistry.register(COMP_ROTFLESH_4_ITEM); GameRegistry.register(COMP_ROTFLESH_5);GameRegistry.register(COMP_ROTFLESH_5_ITEM); GameRegistry.register(COMP_ROTFLESH_6);GameRegistry.register(COMP_ROTFLESH_6_ITEM); GameRegistry.register(COMP_ROTFLESH_7);GameRegistry.register(COMP_ROTFLESH_7_ITEM); GameRegistry.register(COMP_ROTFLESH_;GameRegistry.register(COMP_ROTFLESH_8_ITEM); GameRegistry.register(COMP_ROTFLESH_9);GameRegistry.register(COMP_ROTFLESH_9_ITEM); GameRegistry.register(COMP_GUNPOWDER_1);GameRegistry.register(COMP_GUNPOWDER_1_ITEM); GameRegistry.register(COMP_GUNPOWDER_2);GameRegistry.register(COMP_GUNPOWDER_2_ITEM); GameRegistry.register(COMP_GUNPOWDER_3);GameRegistry.register(COMP_GUNPOWDER_3_ITEM); GameRegistry.register(COMP_GUNPOWDER_4);GameRegistry.register(COMP_GUNPOWDER_4_ITEM); GameRegistry.register(COMP_GUNPOWDER_5);GameRegistry.register(COMP_GUNPOWDER_5_ITEM); GameRegistry.register(COMP_GUNPOWDER_6);GameRegistry.register(COMP_GUNPOWDER_6_ITEM); GameRegistry.register(COMP_GUNPOWDER_7);GameRegistry.register(COMP_GUNPOWDER_7_ITEM); GameRegistry.register(COMP_GUNPOWDER_;GameRegistry.register(COMP_GUNPOWDER_8_ITEM); GameRegistry.register(COMP_GUNPOWDER_9);GameRegistry.register(COMP_GUNPOWDER_9_ITEM); } //This gets called on ClientPoxy public static void registerRenders() { registerRender(COMP_ROTFLESH_1, COMP_ROTFLESH_1.getRegistryName().toString()); registerRender(COMP_ROTFLESH_2, COMP_ROTFLESH_2.getRegistryName().toString()); registerRender(COMP_ROTFLESH_3, COMP_ROTFLESH_3.getRegistryName().toString()); registerRender(COMP_ROTFLESH_4, COMP_ROTFLESH_4.getRegistryName().toString()); registerRender(COMP_ROTFLESH_5, COMP_ROTFLESH_5.getRegistryName().toString()); registerRender(COMP_ROTFLESH_6, COMP_ROTFLESH_6.getRegistryName().toString()); registerRender(COMP_ROTFLESH_7, COMP_ROTFLESH_7.getRegistryName().toString()); registerRender(COMP_ROTFLESH_8, COMP_ROTFLESH_8.getRegistryName().toString()); registerRender(COMP_ROTFLESH_9, COMP_ROTFLESH_9.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_1, COMP_GUNPOWDER_1.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_2, COMP_GUNPOWDER_2.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_3, COMP_GUNPOWDER_3.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_4, COMP_GUNPOWDER_4.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_5, COMP_GUNPOWDER_5.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_6, COMP_GUNPOWDER_6.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_7, COMP_GUNPOWDER_7.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_8, COMP_GUNPOWDER_8.getRegistryName().toString()); registerRender(COMP_GUNPOWDER_9, COMP_GUNPOWDER_9.getRegistryName().toString()); } public static void registerRender(Block block, String name) { RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); renderItem.getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(name, "inventory")); }
  20. Solved. turns out that for some reason, in this case if I pass player as null, the sound wont play. I'm sending the player now, and it plays ok.
  21. Ohhh so.... This been ClientSide only, I can't play sounds unless I send them to the Server right? This is gonna be more complex of what I thought. Tried client side but sound doesn't play.
  22. Thanks a lot, I forgot we can access the world that way Gonna see what I will do with the BlockPos that playSound is specting
  23. Thanks a lot, yes I tested new Forge, and it's everything fine now.

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.