Posted December 1, 20195 yr Hey, its me again. I know I might be boring but...… How do I create Tile Entitys and Gui in 1.14.4. And energy generator, energy storage, and how to send power like RF or something like that. Please don't judge me im new in 1.14.4.Btw my loot tables don't get loaded. And what is difference between CUTOUT and CUTOUT_MIPPED? Is there any way to make 3D translucent blocks? . . . . . . . . . . . . . . . I already have topic on How to make food in 1.14.4. But …. Don't judge me, I want to know like how to make food in 1.14.4 because I didn't learn anything from previous topic. Explain what means .food(MYFOOD). Edited December 1, 20195 yr by Anonomys This is my signature. I don't really too much know about java but i try to help and i try to get help from others too. Thank you!
December 1, 20195 yr I recommend this tutorial for you, first: https://www.youtube.com/watch?v=DgY6kKf5rGU&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ By the way... in the previous topic, I told you how what .food(MYFOOD) means. The new Item.Properties() is a builder, and you set each of its values by telling it .<the thing I want to set>(<what I want it to be>). For example, this piece of code: new Item.Properties().addToolType(ToolType.PICKAXE, 3) makes your item a pickaxe that has a level of iron (Don't use it this way, it's only going to mine everything that needs at least an iron pickaxe, it will be slow as you hand, to create proper tools use the PickaxeItem, AxeItem and the other classes). Another example, this piece of code: new Item.Properties().maxStackSize(16) makes it, so that your item stacks in 16, instead of 64. These builders are easy to use. If you want to set multiple things, you continue the line, like this: new Item.Properties().maxStackSize(16).food(Foods.APPLE) This makes your item stack in 16, AND make it a food that has the same values as an apple. This Foods.APPLE is the same that I made in the previous topic, named MYFOOD. It could be named everything you want, BLUEBERRY, PEAR, GRAPE, it doesn't matter. It only sets the values of the food itself. It's used like this in a really unrealistic example: public class ModClass { // The foods are declared with a builder as well. Here I set it like this: new Food.Builder().<Always edible>().<Fast>().<Meat>().<How much it fills>(8).<How long it lasts>(3.0f).build() // You won't always need to close your line with .build(). Some classes need it, some not. public static final Food ExampleFood = new Food.Builder().setAlwaysEdible().fastToEat().meat().hunger(8).saturation(3.0f).build() // Your register event, I don't know how you made your one. public static void RegisterItems(final RegistryEvent.Register<Item> event) { event.getRegistry().register(new BasicItem(new Item.Properties().group(/*item group, you need to set this, here: ItemGroup.FOOD */).food(/*anything you made, here: ExampleFood */), name)); } } If you still don't understand how it works after this, it means you can't program in java / with any version of Forge at all. This syntax is really basic and used almost everywhere. Edited December 1, 20195 yr by Legenes Grammar procedure WakeMeUp(Integer plusTime); var I: Integer; begin for I := 0 to plusTime do begin println('One more minute!'); Sleep(1000); end; println('Okay, nothing to worry, I''m alive!'); println('So... somebody can give me a coffee?'); println('I know it''s Pascal, and not Java, but I love it :D.'); end;
December 1, 20195 yr Author 32 minutes ago, Legenes said: I recommend this tutorial for you, first: https://www.youtube.com/watch?v=DgY6kKf5rGU&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ By the way... in the previous topic, I told you how what .food(MYFOOD) means. The new Item.Properties() is a builder, and you set each of its values by telling it .<the thing I want to set>(<what I want it to be>). For example, this piece of code: new Item.Properties().addToolType(ToolType.PICKAXE, 3) makes your item a pickaxe that has a level of iron (Don't use it this way, it's only going to mine everything that needs at least an iron pickaxe, it will be slow as you hand, to create proper tools use the PickaxeItem, AxeItem and the other classes). Another example, this piece of code: new Item.Properties().maxStackSize(16) makes it, so that your item stacks in 16, instead of 64. These builders are easy to use. If you want to set multiple things, you continue the line, like this: new Item.Properties().maxStackSize(16).food(Foods.APPLE) This makes your item stack in 16, AND make it a food that has the same values as an apple. This Foods.APPLE is the same that I made in the previous topic, named MYFOOD. It could be named everything you want, BLUEBERRY, PEAR, GRAPE, it doesn't matter. It only sets the values of the food itself. It's used like this in a really unrealistic example: public class ModClass { // The foods are declared with a builder as well. Here I set it like this: new Food.Builder().<Always edible>().<Fast>().<Meat>().<How much it fills>(8).<How long it lasts>(3.0f).build() // You won't always need to close your line with .build(). Some classes need it, some not. public static final Food ExampleFood = new Food.Builder().setAlwaysEdible().fastToEat().meat().hunger(8).saturation(3.0f).build() // Your register event, I don't know how you made your one. public static void RegisterItems(final RegistryEvent.Register<Item> event) { event.getRegistry().register(new BasicItem(new Item.Properties().group(/*item group, you need to set this, here: ItemGroup.FOOD */).food(/*anything you made, here: ExampleFood */), name)); } } If you still don't understand how it works after this, it means you can't program in java / with any version of Forge at all. This syntax is really basic and used almost everywhere. I understand but it tells me "expected 1 arguments but found 2" This is my signature. I don't really too much know about java but i try to help and i try to get help from others too. Thank you!
December 1, 20195 yr Just now, Anonomys said: I understand but it tells me "expected 1 arguments but found 2" Post your code, where the error appeared. procedure WakeMeUp(Integer plusTime); var I: Integer; begin for I := 0 to plusTime do begin println('One more minute!'); Sleep(1000); end; println('Okay, nothing to worry, I''m alive!'); println('So... somebody can give me a coffee?'); println('I know it''s Pascal, and not Java, but I love it :D.'); end;
December 1, 20195 yr Author I don't know if I did it good but here's it: event.getRegistry().register("engraced_apple", new Item((new Item.Properties().food(APPLE)).group(hysteltab))); This is my signature. I don't really too much know about java but i try to help and i try to get help from others too. Thank you!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.