Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DarkRattle

Members
  • Joined

  • Last visited

Everything posted by DarkRattle

  1. I don't think that's what's causing this though?
  2. I don't think that's what's causing this though?
  3. So every other armor piece of mine has the right armor value (based on diamond) +3s for boots and helmet but my leggings and chestplate seem to be switched, +6 for chestplate and +8 for leggings, can't figure it out. LEGS: super(EnumHelper.addArmorMaterial("TUNGSTEN_LEGGINGS_MATERIAL", "darkpack:tungsten", 181, new int[] {3, 8, 6, 3}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4f), 2, EntityEquipmentSlot.LEGS); CHEST: super(EnumHelper.addArmorMaterial("TUNGSTEN_CHESTPLATE_MATERIAL", "darkpack:tungsten", 181, new int[] {3, 8, 6, 3}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4f), 1, EntityEquipmentSlot.CHEST);
  4. So every other armor piece of mine has the right armor value (based on diamond) +3s for boots and helmet but my leggings and chestplate seem to be switched, +6 for chestplate and +8 for leggings, can't figure it out. LEGS: super(EnumHelper.addArmorMaterial("TUNGSTEN_LEGGINGS_MATERIAL", "darkpack:tungsten", 181, new int[] {3, 8, 6, 3}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4f), 2, EntityEquipmentSlot.LEGS); CHEST: super(EnumHelper.addArmorMaterial("TUNGSTEN_CHESTPLATE_MATERIAL", "darkpack:tungsten", 181, new int[] {3, 8, 6, 3}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4f), 1, EntityEquipmentSlot.CHEST);
  5. thank you, I just did muultimap.clear() before it, worked the same.
  6. thank you, I just did muultimap.clear() before it, worked the same.
  7. So anything extending ItemTool has an attackdelay variable that can be changed easily. ItemSword doesn't but I figured out how it works, though when I implement it in my custom sword to get an attack speed of 3.2 it doesn't work, stays at 1.6, why is that? public class TungstenSword extends ItemSword { public TungstenSword() { super(EnumHelper.addToolMaterial("tungsten_sword_material", 2, 8591, 1.0f, 5.0f, 30)); setUnlocalizedName("tungsten_sword"); setCreativeTab(CreativeTabs.COMBAT); } @Override public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) { Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot); if (equipmentSlot == EntityEquipmentSlot.MAINHAND) { multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", (double)this.getDamageVsEntity(), 0)); multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", (double) -0.8D, 0)); } return multimap; } }
  8. So anything extending ItemTool has an attackdelay variable that can be changed easily. ItemSword doesn't but I figured out how it works, though when I implement it in my custom sword to get an attack speed of 3.2 it doesn't work, stays at 1.6, why is that? public class TungstenSword extends ItemSword { public TungstenSword() { super(EnumHelper.addToolMaterial("tungsten_sword_material", 2, 8591, 1.0f, 5.0f, 30)); setUnlocalizedName("tungsten_sword"); setCreativeTab(CreativeTabs.COMBAT); } @Override public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) { Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot); if (equipmentSlot == EntityEquipmentSlot.MAINHAND) { multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", (double)this.getDamageVsEntity(), 0)); multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", (double) -0.8D, 0)); } return multimap; } }
  9. I looked at your code and implemented it and it fixed it, thank you very much !
  10. Hi, thanks for the reply, I am using EnumHelper.addEnum as you can see?
  11. So what i'm doing atm. super(EnumHelper.addEnum(ArmorMaterial.class, "tungsten_helmet_material", "darkpack:tungsten", 181, new int[] { 3, 8, 6, 3 }, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND), 0, EntityEquipmentSlot.HEAD); Error Caused by: java.lang.NoSuchMethodException: net.minecraft.item.ItemArmor$ArmorMaterial.<init>(java.lang.String, int, java.lang.String, int, [i, int, net.minecraft.util.SoundEvent)
  12. So first time using forge and the thing is my glass is working BUT in my hand it's not showing as it's texture. It's showing as a full black block. I don't know why. Here are some pics http://gyazo.com/9ae6aac77fd9a4bdaa9f6c9623de98b2 here is my code: public class BlockBallisticsGlass extends Block { public BlockBallisticsGlass() { super(Material.glass); setBlockName("glass_ballistics"); setBlockTextureName(DarkPack.MODID + ":" + getUnlocalizedName().substring(5)); setCreativeTab(CreativeTabs.tabBlock); setStepSound(soundTypeGlass); setHardness(1.0F); setResistance(1000F); } public int getBlockTextureFromSideAndMetadata(int i, int j) { return 9; } public int quantityDropped(Random r) { return 0; } @SideOnly(Side.CLIENT) public int getRenderBlockPass() { return 1; } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } protected boolean canSilkHarvest() { return true; } }

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.