Jump to content

awesomedude3595

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by awesomedude3595

  1. yes i know but it ask for 3 parameters i only know what to enter for the first one.
  2. what is a scan code? what are the modifiers? there are both integers but other than that idk. where do i get the values for them from.
  3. I know but I dont know what that means
  4. I looked at the parameters for keyPressed and got the keyCode but i dont know what to put for the other 2.
  5. I want to detect when the player presses the arrow keys so that I can rotate a entity on my custom screen. I know how to rotate the entity but dont know how to detect when the player is pressing one of the keys.
  6. I have created a custom GUI which has custom a custom recipe. I want to have the output of the recipe change depending on what button is pressed. I have created the buttons however I cannot get them to change the recipe output. Code Here
  7. I have created a boolean that changes between true/false when you click the button, however after clicking the button you have to take an item away and put it back for the result to change. Is there a way I can have the result change without needing to do this?
  8. I have created a custom GUI which has a working custom crafting recipe. I want to have the recipe's result to change depending on what button on the GUI was pressed. It might require 2 different recipes. How would I do this? Code here.
  9. I have added a RegistryType and now the game no longer crashes when you put something in slot 2. When I put the items in it does not put anything in the result slot. Therefore I presume that my recipe is not working or loading.
  10. I have been trying to create a custom GUI that can use custom crafting recipes. The crafting part doesn't work I assume that this is because of this: public RecipeType<?> getType() { return RecipeType.SMITHING; } In the common/crafting/ModUpgradeRecipe, however you cannot create a custom RecpeType because there is no forgeRegistry for it. Also whenever I put any item in the 2nd slot the game crashes, I didn't have that issue until and added the matter_essence_converter.json recipe file. Pls help me fix these issues. Here is git repo https://github.com/Awesomedude3595/1.18.1-Handheld-Inventions
  11. now it loads the screen but it just flashes then disappears. Any idea what might cause that?
  12. wait nvm I see the duplicate menu type.
  13. What do you mean by this? Is it to do with not using enqueueWork also how do I use the enqueueWork. I have tried using it a couple of ways but it still gives the same error, this might be to do with having 2 MenuTypes if so how do I fix this?
  14. Is that not done in the client/event/ClientModEvents clientSetup? Also I made some dumb mistakes in the first post fixed them now but the error still exists.
  15. I am trying to create a custom GUI for a block in my mod. When I right click on the block I get this error "Failed to create screen for menu type: handheld_inventions:essence_conveter". Help me fix this. The git repo is here.
  16. I have created my own creative tab and would like to add all my mod items into this however i would also like to add them into Vanilla creative tabs but i cant seem to have an item/block be in more than 1 tab
  17. Thx I got it to work
  18. So like this? public static final ModItemGroup ItemGroup = new ModItemGroup(DesignableArmor.MOD_ID); but that still doesn't work?
  19. I believe that CreativeTab has been replaced by ItemGroup so i made this code. public class ModItemGroup extends ItemGroup { public ModItemGroup(String Label) { super(Label); } @Override public ItemStack makeIcon() { return new ItemStack(ModItems.Silver_chestplate.get()); } } public class DesignableArmor { public static final ModItemGroup ItemGroup = new ModItemGroup("Designable Armor"); however this has an issue with the name of the tab it appears as itemGroup.Designable Armor. Is there a way to get rid of the itemGroup. part?
  20. I know how to make an ArmorMaterial but is there something similar for making tools in 1.16.5. If there is not then how would I go about making a custom pickaxe.
  21. thx I made these changes and now it works!!
  22. public class ModItems { public static final RegistryObject<ArmorItem> Silver_chestplate = Registration.Items.register("silver_chestplate", () -> new ArmorItem(ModArmorMaterials.silverMaterial, EquipmentSlotType.CHEST, new Item.Properties().tab(ItemGroup.TAB_COMBAT))); public static final RegistryObject<ArmorItem> Silver_helmet = Registration.Items.register("silver_helmet", () -> new ArmorItem(ModArmorMaterials.silverMaterial, EquipmentSlotType.HEAD, new Item.Properties().tab(ItemGroup.TAB_COMBAT))); public static final RegistryObject<ArmorItem> Silver_leggings = Registration.Items.register("silver_leggings", () -> new ArmorItem(ModArmorMaterials.silverMaterial, EquipmentSlotType.LEGS, new Item.Properties().tab(ItemGroup.TAB_COMBAT))); public static final RegistryObject<ArmorItem> Silver_boots = Registration.Items.register("silver_boots", () -> new ArmorItem(ModArmorMaterials.silverMaterial, EquipmentSlotType.FEET, new Item.Properties().tab(ItemGroup.TAB_COMBAT))); static void register() {} } public enum ModArmorMaterials implements IArmorMaterial { silverMaterial("silver", 7, new int[]{1, 3, 5, 2}, 25, SoundEvents.ARMOR_EQUIP_GOLD, 0.0F, 0.0F, () -> { return Ingredient.of(ModItems.Silver_ingot.get()); }); private static final int[] HEALTH_PER_SLOT = new int[]{13, 15, 16, 11}; private final String name; private final int durabilityMultiplier; private final int[] slotProtections; private final int enchantmentValue; private final SoundEvent sound; private final float toughness; private final float knockbackResistance; private final LazyValue<Ingredient> repairIngredient; ModArmorMaterials(String p_i231593_3_, int p_i231593_4_, int[] p_i231593_5_, int p_i231593_6_, SoundEvent p_i231593_7_, float p_i231593_8_, float p_i231593_9_, Supplier<Ingredient> p_i231593_10_) { this.name = p_i231593_3_; this.durabilityMultiplier = p_i231593_4_; this.slotProtections = p_i231593_5_; this.enchantmentValue = p_i231593_6_; this.sound = p_i231593_7_; this.toughness = p_i231593_8_; this.knockbackResistance = p_i231593_9_; this.repairIngredient = new LazyValue<>(p_i231593_10_); } public int getDurabilityForSlot(EquipmentSlotType p_200896_1_) { return HEALTH_PER_SLOT[p_200896_1_.getIndex()] * this.durabilityMultiplier; } public int getDefenseForSlot(EquipmentSlotType p_200902_1_) { return this.slotProtections[p_200902_1_.getIndex()]; } public int getEnchantmentValue() { return this.enchantmentValue; } public SoundEvent getEquipSound() { return this.sound; } public Ingredient getRepairIngredient() { return this.repairIngredient.get(); } @OnlyIn(Dist.CLIENT) public String getName() { return this.name; } public float getToughness() { return this.toughness; } public float getKnockbackResistance() { return this.knockbackResistance; } }
  23. Is there a way I can get this to work in 1.16.5 I had already set it up as on the website you sent but it doesn't appear to work in 1.16.5
×
×
  • Create New...

Important Information

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