Jump to content

Blue_Atlas

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by Blue_Atlas

  1. Ok so i managed to make a shield that only works in the offhand. however it doesn't take damage. here is my code how would i make it get damaged? public class ItemShieldOnlyOffHand extends Item implements IHasModel { public ItemShieldOnlyOffHand(String name) { this.maxStackSize = 1; this.setMaxDamage(336); this.addPropertyOverride(new ResourceLocation("blocking"), new IItemPropertyGetter() { @SideOnly(Side.CLIENT) public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) { return entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F; } }); BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(this, ItemArmor.DISPENSER_BEHAVIOR); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(Main.netherstartab); ModItemsInit.ITEMS.add(this); } public EnumAction getItemUseAction(ItemStack stack) { return EnumAction.BLOCK; } public int getMaxItemUseDuration(ItemStack stack) { return 72000; } public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { if(handIn == EnumHand.OFF_HAND) { ItemStack itemstack = playerIn.getHeldItem(handIn); playerIn.setActiveHand(handIn); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemstack); } else { return new ActionResult<ItemStack>(EnumActionResult.FAIL, playerIn.getHeldItem(handIn)); } } @Override public void registerModels() { Main.proxy.registerItemRenderer(this, 0, "inventory"); } }
  2. I'm trying to make an item that acts like a sword most of the time but when it is in offhand it needs to act like a shield. I have already tried merging the classes but that didn't work and caused the one of the items to be deleted when you take the other one out of your offhand. How would I make an item like what I want?
  3. ok ill note taht for the future managed to figure it out through trial and error
  4. im trying to render and item horizontally in offhand but im having trouble could someone please help? here is the the part of the .json file where i am trying to render the rotation "parent": "item/generated", "display": { "thirdperson_lefthand": { "rotation": [ 45, -90, 90 ], "translation": [ 0, -2.0, 3 ], "scale": [ 0.85, 0.85, 0.85 ] }, "thirdperson_righthand": { "rotation": [ 0, 90, -55 ], "translation": [ 0, 4.0, 0.5 ], "scale": [ 0.85, 0.85, 0.85 ] }, "firstperson_lefthand": { "rotation": [ 0, 0, 45 ], "translation": [ 1.13, 3.2, 1.13 ], "scale": [ 0.68, 0.68, 0.68 ] }, "firstperson_righthand": { "rotation": [ -90, 90, -25 ], "translation": [ 1.13, 3.2, 1.13 ], "scale": [ 0.68, 0.68, 0.68 ] } },
  5. I'm making a texture pack for 1.12.2 and I want to replace the bow with a crossbow. However I want the texture to display horizontally instead of vertically by using a .json file. I would like it to display both in firstperson and thirdperson. Would anyone know how to do this?
  6. I don't think that is a good reward. Sry just honest opinion
  7. Maybe look at the beacon class? I really have no clue what you are trying to do with this but the beacon should have the effect on activated thing you need
  8. here is how i set up my loottable resource location: public static final ResourceLocation CENTAUR = new LootTableList().register(new ResourceLocation(Reference.MOD_ID, "centaur")); i do have it in a loottable handler but it will probably work outside of one
  9. ok but do i raise of lower it?
  10. Biome Init: public class ModBiomeInit { public static final Biome ENDOVERRIDE = new BiomeEndOverride(); public static void registerBiomes() { initBiome(ENDOVERRIDE, "Ender Mutated Biome", BiomeType.COOL, Type.END); } private static Biome initBiome(Biome biome, String name, BiomeType biomeType, Type... types) { biome.setRegistryName(name); ForgeRegistries.BIOMES.register(biome); BiomeDictionary.addTypes(biome, types); BiomeManager.addBiome(biomeType, new BiomeEntry(biome, 10)); BiomeManager.addSpawnBiome(biome); return biome; } } Biome class: public class BiomeEndOverride extends Biome { public BiomeEndOverride() { super(new BiomeProperties("EndOverride").setRainDisabled()); topBlock = Blocks.END_STONE.getDefaultState(); fillerBlock = ModBlocksInit.END_FRAGMENT_ORE.getDefaultState(); this.spawnableMonsterList.clear(); this.spawnableCreatureList.clear(); this.spawnableMonsterList.add(new SpawnListEntry(EntityWalkingShulker.class, 15, 2, 7)); this.spawnableMonsterList.add(new SpawnListEntry(EntityEnderman.class, 25, 3, 9)); } } Register Biome Init: public static void preInitRegistries() { ModBiomeInit.registerBiomes(); } Where is the rarity?
  11. I have made a biome but it generates more often then I like. I want it to generate rarely, like the mesa biome
  12. Nezara if you are still looking for help on this i suggest going to a YouTube channel called Harry's Tech Reveiws and looking at his modding tutorial series
  13. one more question: how do i make it spawn as frequently as a zombie?
  14. never mind writing it out maunaly
  15. sorry about your confusion. i looked up the method on google and it said that types is an element
  16. okay so what should the type of the element be?
  17. where is this documentation?
  18. i have the first parameter as ForgeRegistries.BIOMES what should the second one be?
  19. i havent really quite learned a language but i have used other languages
  20. yes i know what a method is
  21. i am using a reference guide for java
  22. i use a reference guide.
  23. huh? what is this? and that doesnt really tell me how to pass an array of all biomes
  24. so my code is in right place? the problem is i dont want to copy the method over and over again. i would like to know what i need to do to make it spawn in all biomes
×
×
  • Create New...

Important Information

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