
lukas2005
Forge Modder-
Posts
289 -
Joined
-
Days Won
2
Everything posted by lukas2005
-
can you make a github repo for this ?? this says that package growthcraft.api.cellar.CellarRegistry is not found and also does the eclipse say anthing? can you run the game?
-
[1.10.2] How to trample crops when wearing certain armor
lukas2005 replied to gibraltar's topic in Modder Support
cant you just place a dirt under a player if it detects that it is a framland when wearing armor? -
hello i want to make that player inventory does not base on slots number but on weight of items i arelady maded a weight part but now how do i change player inventory? EDIT: i have found a tutorial how to do this: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571597-forge-1-6-4-1-8-custom-inventories-in-items-and
-
[1.10.2][SOLVED] add tooltip for not mine items?
lukas2005 replied to lukas2005's topic in Modder Support
oh my fault thank you for noticing this now it works -
[1.10.2][SOLVED] add tooltip for not mine items?
lukas2005 replied to lukas2005's topic in Modder Support
i decided to make a repo for better look at this https://github.com/lukas2005/IDEA-Mod -
[1.10.2][SOLVED] add tooltip for not mine items?
lukas2005 replied to lukas2005's topic in Modder Support
package lukas2005.idea; import java.util.HashMap; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; public class CustomValues { public static HashMap<Item,Float> ITEMWEIGHT = new HashMap<Item,Float>(); public static HashMap<Block,Float> BLOCKWEIGHT = new HashMap<Block,Float>(); public static void initValues(Configuration config) { config.addCustomCategoryComment("BLOCKS WEIGHT", "Here you can change how much ceratin blocks weight"); for (Block block : Block.REGISTRY) { Property pr = config.get("BLOCKS WEIGHT", block.getRegistryName().toString(), "1.0"); BLOCKWEIGHT.put(block, Float.parseFloat(pr.getString())); Logger.info("Weight of " + block.getRegistryName().toString()+"="+Float.parseFloat(pr.getString())); pr.setComment("Weight of " + block.getRegistryName().toString()); } config.addCustomCategoryComment("ITEMS WEIGHT", "Here you can change how much ceratin items weight"); for (Item item : Item.REGISTRY) { Property pr = config.get("ITEMS WEIGHT", item.getRegistryName().toString(), "1.0"); ITEMWEIGHT.put(item, Float.parseFloat(pr.getString())); Logger.info("Weight of "+item.getRegistryName().toString()+"="+Float.parseFloat(pr.getString())); pr.setComment("Weight of " + item.getRegistryName().toString()); } config.save(); } } -
[1.10.2][SOLVED] add tooltip for not mine items?
lukas2005 replied to lukas2005's topic in Modder Support
i am using MinecraftForge.EVENT_BUS.register(new EventHooks()); in pre init @EventHandler public static void preInit(FMLPreInitializationEvent e) { Logger.setLogger(LogManager.getLogger(Reference.MODID.toUpperCase())); Logger.info("Pre Init!"); MinecraftForge.EVENT_BUS.register(new EventHooks()); Reference.CONFIG = new Configuration(e.getSuggestedConfigurationFile()); ModItems.main(); //Logger.info("Loaded and registered succesfully: " + ModItems.ITEMS.size() + " Items"); CustomValues.initValues(Reference.CONFIG); proxy.preInit(e); } -
[1.10.2][SOLVED] add tooltip for not mine items?
lukas2005 replied to lukas2005's topic in Modder Support
no succes -
[1.10.2][SOLVED] add tooltip for not mine items?
lukas2005 replied to lukas2005's topic in Modder Support
-
[1.10.2][SOLVED] add tooltip for not mine items?
lukas2005 replied to lukas2005's topic in Modder Support
i have code like that @SubscribeEvent public static void onItemTooltip(ItemTooltipEvent e) { List<String> toolTip = e.getToolTip(); if (e.getItemStack().getItem() instanceof ItemBlock) { toolTip.add("Weigth: "+CustomValues.BLOCKWEIGHT.get(Block.getBlockFromItem(e.getItemStack().getItem()))); } else if (e.getItemStack().getItem() instanceof Item) { toolTip.add("Weigth: "+CustomValues.BLOCKWEIGHT.get(e.getItemStack().getItem())); } } and it does not work and console does not say anything about this -
Hello i know how to make tooltip show under a item but what if i want to add it to existing item without modifiyng the class?
-
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
ok solved -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
ok i have one more question. How do i read a float from a Propery object bcause theres a getInt() method but not getFloat()? -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
ok now it works -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
in pre init of main @EventHandler public static void preInit(FMLPreInitializationEvent e) { Logger.setLogger(LogManager.getLogger(Reference.MODID.toUpperCase())); Logger.info("Pre Init!"); Reference.CONFIG = new Configuration(e.getSuggestedConfigurationFile()); ModItems.main(); //Logger.info("Loaded and registered succesfully: " + ModItems.ITEMS.size() + " Items"); CustomValues.initValues(Reference.CONFIG); proxy.preInit(e); } in CustomValues class package lukas2005.idea; import java.util.HashMap; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; public class CustomValues { public static HashMap<Item,Integer> ITEMWEIGHT = new HashMap<Item,Integer>(); public static HashMap<Block,Integer> BLOCKWEIGHT = new HashMap<Block,Integer>(); public static void initValues(Configuration cONFIG) { Reference.CONFIG.addCustomCategoryComment("BLOCKS WEIGHT", "Here you can change how much ceratin blocks weight"); for (Block block : Block.REGISTRY) { Property pr = Reference.CONFIG.get("BLOCKS WEIGHT", block.getRegistryName().toString(), "1"); BLOCKWEIGHT.put(block, pr.getInt()); pr.setComment("Weight of a " + block.getRegistryName().toString()); } Reference.CONFIG.addCustomCategoryComment("ITEMS WEIGHT", "Here you can change how much ceratin items weight"); for (Item item : Item.REGISTRY) { Property pr = Reference.CONFIG.get("ITEMS WEIGHT", item.getRegistryName().toString(), "1"); ITEMWEIGHT.put(item, pr.getInt()); pr.setComment("Weight of a " + item.getRegistryName().toString()); } } } -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
ok i created the code and runned minecraft config genrated but its empty -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
ok but what if config file doesnt exist? do i need to make it by myself? -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
i am confused right now is thre a tutorial about this or maybe docs? -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
i want to load a hash map from a config but also if a value for something is not set then add it -
How to create a single player world through command line?
lukas2005 replied to music7box's topic in Minecraft General
can you post the command b cause i has been searching how to run minecraft from command line for YEARS -
Looking for a way to render/export a model into a list of cubes
lukas2005 replied to MFMods's topic in Minecraft General
Do you mean something like Cray fish Model Creator or Techne? -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
ok now how do i use this Configuration object??? theres only get methods -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
lukas2005 replied to lukas2005's topic in Modder Support
In preInit event has a Configuration object for your mod that is what you will use to create a config. do you mean FMLPreInitializationEvent#getSuggestedConfigurationFile()? Yes and then i can use normal JavaIO? and configuration file syntax is created by me? or is there a recommended way of doing this?