Jump to content

reapersremorse

Members
  • Posts

    61
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by reapersremorse

  1. public class TestingItemClass extends Item implements IHasModel { //Creating the variables String name; private int BurnTime; /* i have my variable BurnTime set to a private int when i try to use this in my constructor below, the variable will not talk to it. i need an ItemStack in the constructor. but when i set the @Override portion, it needs an int because its returning an int. */ public TestingItemClass ( String name, int BurnTime//does not work, if i change to ItemStack, // i cant set int value in my registry, it asks for an itemstack // and when i try to set an itemstack it complains that i need the itemstack and another ) { //when i try to add anything to the super, it complains about the super(); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(UTOTabs.UTOItems); getItemBurnTime(i have no clue what goes here now);//i tried converting to int and ItemStack, neither work when i input info BasicItemRegistry.ITEMS.add(this); } @Override public int getItemBurnTime(ItemStack itemStack){return BurnTime;} //the code above this comment uses an int because the ItemStack has been transformed into an int @Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { tooltip.add("This is a basic item test item");} @Override public void registerModels(){UTOMod.proxy.registerItemRenderer(this, 0, "inventory");} }
  2. sorry im really not great with java, ive been learning while making this mod.wish i had more time off work.
  3. if i set the Burntime within this override, it complains and says it needs an int @Override public int getItemBurnTime(ItemStack itemStack) { return Burntime; } but the super needs an itemstack public class BasicItemPrefab extends Item implements IHasModel { //Creating the variables String name; int maxUses; int harvestLevel; float efficiency; public ItemStack BurnTime; public BasicItemPrefab ( String name, int maxUses, String tool, int toollevel, int stacksize, ItemStack BurnTime ) { super(); setUnlocalizedName(name); setRegistryName(name); setMaxStackSize(1); setCreativeTab(UTOTabs.UTOItems);//sets creative tab, change later //setDamage(,); setMaxDamage(maxUses); setHarvestLevel(tool,toollevel); setMaxStackSize(stacksize); BasicItemRegistry.ITEMS.add(this); getItemBurnTime(BurnTime); //Assigning value to these variables //this.name = Material.(); //this.maxUses = Material(); //this.harvestLevel = Material(); //this.efficiency = Material.getEfficiency(); BasicItemRegistry.ITEMS.add(this); } @Override public int getItemBurnTime(ItemStack itemStack) { return Burntime;//this keeps throwing an error } @Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { //Making the tooltips //For colors use for example: tooltip.add("Max Uses: " + TextFormatting.BLUE + maxUses); tooltip.add("Name: " + TextFormatting.LIGHT_PURPLE +name); tooltip.add("Max Uses: " + TextFormatting.LIGHT_PURPLE +maxUses); tooltip.add(TextFormatting.BLACK +"========="); tooltip.add("Harvest Level: " + TextFormatting.BLUE +harvestLevel); tooltip.add(TextFormatting.BLACK +"========="); tooltip.add("Efficiency: " + TextFormatting.RED +efficiency); } @Override public void registerModels(){UTOMod.proxy.registerItemRenderer(this, 0, "inventory");} } it keeps throwing an error, illegal start of expression. in my item reg class public static final Item BASE_HAMMER = new BasicItemPrefab ("base_hammer",-1,"base_multi_tool",0,1,200);//200 is the burntime that keeps asking for an itemstack.
  4. { //Creating the variables String name; int maxUses; int harvestLevel; float efficiency; public BasicItemPrefab ( String name, int maxUses, String tool, int toollevel, int stacksize, int BurnTime ) { super(); setUnlocalizedName(name); setRegistryName(name); setMaxStackSize(1); setCreativeTab(UTOTabs.UTOItems);//sets creative tab, change later //setDamage(,); setMaxDamage(maxUses); setHarvestLevel(tool,toollevel); setMaxStackSize(stacksize); BasicItemRegistry.ITEMS.add(this); getItemBurnTime(BurnTime); //Assigning value to these variables //this.name = Material.(); //this.maxUses = Material(); //this.harvestLevel = Material(); //this.efficiency = Material.getEfficiency(); BasicItemRegistry.ITEMS.add(this); } int BurnTime; @Override public int getItemBurnTime(ItemStack itemStack) { return BurnTime; } @Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { //Making the tooltips //For colors use for example: tooltip.add("Max Uses: " + TextFormatting.BLUE + maxUses); tooltip.add("Name: " + TextFormatting.LIGHT_PURPLE +name); tooltip.add("Max Uses: " + TextFormatting.LIGHT_PURPLE +maxUses); tooltip.add(TextFormatting.BLACK +"========="); tooltip.add("Harvest Level: " + TextFormatting.BLUE +harvestLevel); tooltip.add(TextFormatting.BLACK +"========="); tooltip.add("Efficiency: " + TextFormatting.RED +efficiency); } @Override public void registerModels(){UTOMod.proxy.registerItemRenderer(this, 0, "inventory");} } i must be an idiot, i cant get the variables to work together properly in the methods. i probibly just need to sleep. this problem has made me feel like an idiot for far too long
  5. ive implemented this in my item class, it would seem if i wish to do this, i will have to add a class for every block or item that i wish to have a fuel value. @Override public int getItemBurnTime(ItemStack itemStack) { return 200; } i use my item class as a prefab class so every item in my mod uses the same class. now they all have a burn value of 200. i was trying not to go this rout but if i have to make a custom class for ever burn value item then i will. i tried setting a variable and calling within the super as a function but that would not work. if i could get this to work in the super then i could set the burn value along with all the other information that i set dynamically. thank you for all the help so far.
  6. GameRegistry.addFuelHandler does not exist in my dev environment ive seen a lot of tutorials referring to this but i believe its for an older version of forge because i can not find it anywhere. im modding for minecraft version 1.12.2 with forge version "forge-1.12.2-14.23.4.2729-mdk" i only find information in the FurnaceFuelBurnTimeEvent.java public class FurnaceFuelBurnTimeEvent extends Event { @Nonnull private final ItemStack itemStack; private int burnTime; public FurnaceFuelBurnTimeEvent(@Nonnull ItemStack itemStack, int burnTime) { this.itemStack = itemStack; this.burnTime = burnTime; } when i try to find the information on FuelHandeler, it brings me to the deprecated class called IFuelHandler
  7. hello, im currently working in mc forge version "forge-1.12.2-14.23.4.2729-mdk" the IFuelHandler has become deprecated ive tried adding an array list, if/and/else/ore and case statements while using an interface which ive built based upon the information provided by forge. i can not for the life of me find a way to add fuel values to blocks and items... i have deleted my interface and im trying something new by accessing the furnace code and now im really lost. could anyone help me a bit?? i would like to be able to use an array list where i can call the modded object and then set the burn time. something like public static final List<Fuel> FUELS = new ArrayList<Fuel>(); //fuel/block or item name/new fuel (furnace burn time,can set fire in world) //if its an item, if set to not burn in world, then the item will not be destroyed by lava or fire //if its a block and set to burn in world, then it will be destroyed by fire and lava like wood. public static final Fuel GENERIC_BLOCK = new FUELS(300,true){}; public static final Fuel GENERIC_ITEM = new FUELS(100,false){}; dont mind the comments, that is for ideas and hopeful future implimentations. any help would be most welcomed.
  8. ok thank you, i will go make a separate post.
  9. hello, im currently working in mc forge version "forge-1.12.2-14.23.4.2729-mdk" the IFuelHandler has become deprecated ive tried adding an array list, if/and/else/ore and case statements while using an interface which ive built based upon the information provided by forge. i can not for the life of me find a way to add fuel values to blocks and items... i have deleted my interface and im trying something new by accessing the furnace code and now im really lost. could anyone help me a bit?? i would like to be able to use an array list where i can call the modded object and then set the burn time. something like public static final List<Fuel> FUELS = new ArrayList<Fuel>(); //fuel/block or item name/new fuel (furnace burn time,can set fire in world) //if its an item, if set to not burn in world, then the item will not be destroyed by lava or fire //if its a block and set to burn in world, then it will be destroyed by fire and lava like wood. public static final Fuel GENERIC_BLOCK = new FUELS(300,true){}; public static final Fuel GENERIC_ITEM = new FUELS(100,false){}; dont mind the comments, that is for ideas and hopeful future implimentations.
  10. thanks for the advice lexmanos i fixed my problem... i feel like an idiot but i had my default jar file opening program as winrar instead of java se binary... i didnt even notice i had changed it ha ha i was actually installing on my pc then moving files over (i understood that the files were being created instead of placed from some magic folder hidden in the installer, thank you for clarifying tho) for my host, they run the server as if a regular computer would. they also have a pick jar feature so u can switch between servers im happy that i received nice reply and no one said anything about my lack of grammar and punctuation... thank you for taking the time to reply to my post, its much appreciated especially since u do all the stuff related to forge as a past time
  11. hello i have been trying to set up a minecraft server jar for a server that is hosted by http://exodushosting.net/ i have tried 1.7.2 and up ta 1.7.10 but when i download the installer i pick an empty folder to install into install 3 objects are now in this folder folder: libraries jar: forge-version-universal jar: minecraft_server.version after that i select: forge-version-universal (which is what all the tutorial do) and run with java platform se binary when this happens on the tutorials, things are installed into the folder while the server starts. but when i do this, none of the server files are installed into the server and most of the time the server does not start up (sometimes the server starts even tho it does not create these folders im sorry for any grammer, punctuation and spelling mystakes... i would b very happy if i could b helped.
×
×
  • Create New...

Important Information

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