Jump to content

winnetrie

Members
  • Posts

    408
  • Joined

  • Last visited

Everything posted by winnetrie

  1. In previous minecraft version i had a config file in my mod so people can change stuff or disable some recipes. Now that we are using the json file style recipes, how would i disable them now since they are not in the code? Besides that does the game load automatic all the recipes that are in the recipes folder or ...?
  2. True, you have a point there. I always intended to correct this, but never did. Too lazy i think (because it worked anyway). I will correct this once and for all before releasing a 1.12 version. Thank you for your help!
  3. So i think i understand it more or less. I create a class that handles all the events for my mod. The manual says it can have multiple events. Is this recommended or not? Should i seperate some events in an other class? Also i see i register it like this: MinecraftForge.EVENT_BUS.register() Sorry to ask, but where do i put this line? Inside my mainclass i guess? But where preInit, Init or postInit? Or somewhere else?
  4. I know you have said that alot of times already but i have run my mod on my server for a while in 1.7.10, 1.10.2 and 1.11.2 and it never crashed. I also see no logic why the server will load my ModBlocks class and run all the methods inside it while it hasn't asked to do so. Ofcourse you have way more experience and knowledge with these things, but then again why does it not crash the server anyway? How i do that? Where do i call the event?
  5. Can you explain this better? Why is it a problem to call it in my client proxy? I am really confused now, because it is working all fine now.
  6. Nvm, lol! Turn out i forgot something to do in my clientproxy: public class ClientProxy implements CommonProxy{ @Override public void preInit() { NetworkRegistry.INSTANCE.registerGuiHandler(Tem.instance, new ModGuiHandler()); if (ModConfig.load_module_woodchests==true){ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityModChest.class, new ModTERChest()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityModChestBOP.class, new ModTERChestBOP()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityModChestBOP2.class, new ModTERChestBOP2()); } if (ModConfig.load_module_metalchests==true){ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityIronChest.class, new ModTERIronChest()); } if (ModConfig.load_module_voidchest==true){ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVoidChest.class, new ModTERVoidChest() ); } //ModBlockStateMapper.registerAllBlocks(); //ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBirchChest.class, new ModTERChest()); ModItems.registerRenders(); //ModBlocks.registerRenders(); //if(Loader.isModLoaded("biomesoplenty")){ //ModBlocksBOP.registerRenders(); //ModItemsBOP.registerRenders(); //} System.out.println("renders have been registered"); } } I forgot those // . Works fine now. Thank you anyway.
  7. It is in a method called public static void registerRenders(){} Wich is in the ModBlocks class. Yes i know you are going to say it doesn't belong there. Eventually i will move it. It has never been a problem, because i call this method only in the clientproxy. Having everything in my ModBlocks class gives me a better oversight. That's my opinion. Since that class doesn't do anything on its own, why not.
  8. This is how i registered the renders in 1.11.2: private static void registerMetaRender(Block block, int meta, String variant){ ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(block.getRegistryName(),variant)); } private static void registerRender(Block block, String variant){ ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(),variant)); } private static void registerRender(Block block){ ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(),"inventory")); } private static void registerItemRender(Item item){ ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory")); } and i use it like this: registerMetaRender(chalkstone,0,"type=raw"); registerMetaRender(chalkstone,1,"type=smooth"); registerMetaRender(chalkstone,2,"type=bricked"); this is how my blockstate file looks like: { "forge_marker": 1, "defaults": { "model": "minecraft:cube_all" }, "variants": { "type": { "raw": { "textures": { "all": "tem:blocks/chalkstone" } }, "smooth": { "textures": { "all": "tem:blocks/smooth_chalkstone" } }, "bricked": { "textures": { "all": "tem:blocks/bricked_chalkstone" } } } } }
  9. I saw in the manual something about the new registering stuff, but do not fully understand how that works. I have tried some stuff that didn't worked. I found a way to register stuff and it works, but i'm not sure if that's the way to go. It looks like this: public static Block registerBlock(Block block){ ItemBlock item = new ItemBlock(block); item.setRegistryName(block.getRegistryName()); ForgeRegistries.BLOCKS.register(block); ForgeRegistries.ITEMS.register(item); return block; } I have created this method to register things. I also made 1 for metablocks and for slabs. I also found out that all blocks that have subblocks don't have their subblocks in the creative tab anymore. They have been registered and are in the game. I checked this with the /give user modid:limestone 1 0 (or 1,2) It gave me the required block. In my case limestone (0), polished limestone(1) and bricked limestone(2)
  10. Since i updated my workspace to 1.12 and updated to the new registering. All my blocks do not render their item. If you place them down they are fine but in any inventory or when throwing away it is a purple-black square. I saw in my log they are all looking for a variant "inventory". Do they need an "inventory" variant now? In 1.11.2 everything worked fine. Has something changed about this?
  11. i have added this to the tileentity's update method: for (int slot = 0; slot < this.getSizeInventory(); slot++) { ItemStack stack = getStackInSlot(slot); if (stack != null) { decrStackSize(slot, 1); } It deletes really fast. Not that i bother personally, but does this has any negative effects ont he gameplay? maybe lagg or something? Should i make it slower?
  12. I found another bug ..... Whenever my custom chest(s) is opened while a hopper is underneath it, nothing happens. It looks like the hopper can't pull the items from the chest while it is opened. As soon as i close it the items start to transfer. Same thing whenever the hopper is above my custom chest. Why is this and how do i solve this? Lol...I gave them the ability to act as a trapped chest, wich disables the hopper when opened. Forgot about that...
  13. This looks a bit complicating...Lots of things to take care. I'll look into this later.
  14. In the EntityPlayer there is this: private InventoryEnderChest theInventoryEnderChest = new InventoryEnderChest(); How would i add my own custom enderchest to this class? If this is even possble. My ender chest has the same function as the standard 1 but with double inventory space. I just can't do this: InventoryFelEnderChest inventoryenderchest = playerIn.getInventoryFelEnderChest(); Because it doesn't exists in EntityPlayer. While it has to be bounded to the player, i have to find a way to add this somehow to the EntityPlayer.class (i think)
  15. I want to make a chest that once you drop items in it, it deletes it. I know how to make a chest, but i want to prevent it to store the inventory and it should delete everything it gets.
  16. I have remade all my customchests (the wooden) and they work all properly now! I tested alot of things to find any bugs. I also ran into a problem with my custom metal chests. They should have a bigger inventory, but this: @Override public int getSizeInventory() { if (this.getChestType()==BlockModIronChest.Type.IRON){ this.chestSlots=36; } else if (this.getChestType()==BlockModIronChest.Type.GOLD){ this.chestSlots=27; } else if (this.getChestType()==BlockModIronChest.Type.DIAMOND){ this.chestSlots=45; } else if (this.getChestType()==BlockModIronChest.Type.FELIRON){ this.chestSlots=54; } return this.chestSlots; } gives me an out of bounds error when i open 1 of those chests after a world reload/restart. If i give the return a fixed value for example 36 i never get an error. However i want it to get that information from the chest type. Why is it giving me an out of bounds error and how do i solve it? EDIT: Here it asked for the this.getSizeInventory() and i changed it to 54, the max posseble slots. @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); this.chestContents = NonNullList.<ItemStack>withSize(54, ItemStack.EMPTY); if (!this.checkLootAndRead(compound)) { ItemStackHelper.loadAllItems(compound, this.chestContents); } if (compound.hasKey("CustomName", 8)) { this.customName = compound.getString("CustomName"); } } I also did changed this, but didn't saw there was something a like in the readFromNBT: private NonNullList<ItemStack> chestContents = NonNullList.<ItemStack>withSize(54, ItemStack.EMPTY); It was defined as 27 as it is standard.
  17. I found the reason for my problem more or less, but don't know how to fix it: The chest i create gives a variable (TileEntitySlots) to the TE. Then i use this here: @Override public int getSizeInventory() { return TileEntitySlots; } This is working fine when you place a chest down, it has the number of slots like it should have. Yet after a restart the chest is visible but when opening the GUI/Container isn't showing up, because (i checked it) TileEntitySlots is null!! So i tried this instead: @Override public int getSizeInventory() { BlockModIronChest block = (BlockModIronChest) this.getBlockType(); TileEntitySlots = block.CHEST_SLOTS; return TileEntitySlots; } Now when i restart the game the chests are invisible, but once you click the invisible block they turn visible and the chest opens with the right inventory size. The chests are working fine, yet each restart they are inviseble at start. I'm wondering why.
  18. I have another problem with custom chests. For some reason my chest is not rendering when i restart the game. If i open the chest it renders and it keeps rendering like it should. Is there a reason why the render does not work at game start?
  19. Hello i am Winnetrie/Buradin and this is Tim's Expansion Mod: I Started modding because i wasn't satisfied how minecraft was like it was and still is today (it has been improved abit). For example there are only 2 types of walls, no slabs or stairs for granite/diorite/andesite and many other blocks that would make sense to have this. I had also the opinion having glass and wool slabs/stairs would be nice! You have also 6 woodtypes and they do nothing special with it. Keep in mind that i started modding with 1.7.10 where fences and gates and doors were only in oak. So i started modding and added many things. Things that would make sense. Things that doesn't look silly. Things that aren't overpowered. Things people wish they were in the game. Besides that i am also a huge fan of biomesoplenty so ofc, i added support for those woodtypes :-) Today we are in 1.11.2 and 1.12 isn't far away. So what did i added so far? : - new blocks (marble, pale limestone, demonite), with world gen. - Added slabs, stairs, walls for many blocks (biomesoplenty [bop] included) that didn't had these before. For example (hardened clay, wool, glass) - Added feliron ore/metal block/ingot/nugget/armor/tools (scythe from bop included) - Added new model for ladders (yes they are now 3 dimensional, not flat anymore) and added new model for bookshelfs (nothing fancy only some depth) - Added ladders and bookshelfs for all woodtypes , bop included - Added 16 new bricks blocks and 16 bricked blocks( like stone brick block), slabs/stairs/walls included - Added trapdoors in all woodtypes. Things that i plan to add in the future: - Crafting table in all woodtypes (Done, but not yet released) - Chest in all woodtypes (Done, but not yet released) - Feliron horse armor (textures are done) - Readding the food that i removed before(textures are done) - Sign/pressure plate/ button in all woodtypes ,bop included! Probably also in stone types and glass,but no glass signs or glass pressure plates(0 %) - Glass doors (0 %) - More furnaces in some other stone types (0 %) - Better model for the rails. No more flat floating rails. (0 %) - Paintable minecarts (0 %) - Armor stands in all woodtypes, bop included. (0 %) - More addition to the config file. (0 %) - Things i do not know yet or suggestions. () You can download my mod on the official curse page. Please do not download it from anywhere else. Tim's Expansion Mod
  20. Thank you! I have put this into my client proxy (i think it has to be in the client proxy) ModelLoader.setCustomStateMapper(ModBlocks.chest, (new StateMap.Builder()).ignore(new IProperty[] {BlockModChest.FACING, BlockModChest.TYPE}).build()); This looks to work fine for me. I still use the blockstate json for the inventory item and the particle effect. I'm pretty sure there is somehow an alternative to this. This i do not know yet. You have both been very helpfull. Thank you very much. I really appreciate! I think it's time now to make all the chests....finally
  21. Aha hehe i found the bug....and it was my fault. Here was the problem if someone want to know btw: private boolean isChestAt(BlockPos posIn) { if (this.world == null) { return false; } else { Block block = this.world.getBlockState(posIn).getBlock(); return block instanceof BlockModChest ;//&& block == this.getBlockType() ; } } the "&& block== this.getBlockType();" Oh and 1 more thing. Is there a way i can prevent the game to look for blockstate variants from the blockstate.json. it wants to have variants like facing= east / facing= south and type=sprucechest But those are not relevant. I can ofc just fill in all the variants in the blockstate json and then do nothing with it.
  22. I do not understand every detail but most of it i do. I'm wondering why it isn't updating? It does update when placing another adjacent chest but not when 1 is broken.
  23. I'm wondering why i need to do this while the vanilla chest does not require it? I'm also not sure how to get these parameters right in this: markAndNotifyBlock(pos, chunk, iblockstate, newState, flags)
  24. Sorry, but i have really no idea what to do with this. Do i place it here ?: @Override public void updateContainingBlockInfo() { super.updateContainingBlockInfo(); this.adjacentChestChecked = false; doubleChestHandler = null; } in the tileentity class?
  25. Where do i place this exactly? In de tesr?
×
×
  • Create New...

Important Information

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