Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

ChickenWand33

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ChickenWand33's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Above is what it looks like in singleplayer/eclipse This is what it ends up like because of poopy packet handler >:[
  2. package com.mysticalmod.capabilities.item; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.CapabilityToken; public class CapabilityItemLvl { public static Capability<ItemLvl> ITEM_LVL_CAPABILITY = CapabilityManager.get(new CapabilityToken<>() {}); } package com.mysticalmod.capabilities.item; import com.mysticalmod.capabilities.ColorConstants; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; public class DefaultItemLvl implements ItemLvl { private int itemLvl; private int itemRarity; public String itemRarityName = "Bruh"; public void determineLvl(int xp, Player player, ItemStack item) { itemLvl = xp; ItemLvlProvider.levelClientUpdate(player, item); } public String getRarity() { return itemRarityName; } public int getItemLvl() { return itemLvl; } public void setItemLvl(int amount) { this.itemLvl = amount; } public int getItemRarity() { return itemRarity; } public void setItemRarity(int amount) { this.itemRarity = amount; } public String getRarityAndColor() { if (itemRarityName == null) { setRarityName(); } if (itemRarityName == "Mythical") { return ColorConstants.RED + ColorConstants.BOLD + "Mythical"; } if (itemRarityName == "Legendary") { return ColorConstants.GOLD + "Legendary"; } else if(itemRarityName == "Epic") { return ColorConstants.DARK_PURPLE + "Epic"; } else if (itemRarityName == "Rare") { return ColorConstants.BLUE + "Rare"; } else if (itemRarityName == "Uncommon") { return ColorConstants.GREEN + "Uncommon"; } else {return ColorConstants.GRAY + "Common";} } public void generateRarity() { double i = Math.random(); if (i > .999d) { itemRarity = 5; } else if (i > .99d) { itemRarity = 4; } else if (i > .95d) { itemRarity = 3; } else if (i > .80d) { itemRarity = 2; } else if (i > .50d) { itemRarity = 1; } else { itemRarity = 0; } setRarityName(); } public float getRarityMultiplier() { setRarityName(); if (itemRarity == 5) { return 2.0f; } else if (itemRarity == 4) { return 1.5f; } else if(itemRarity == 3) { return 1.35f; } else if (itemRarity == 2) { return 1.25f; } else if (itemRarity == 1) { return 1.1f; } else {return 1f;} } private void setRarityName() { if (itemRarity == 5) { itemRarityName = "Mythical"; } else if (itemRarity == 4) { itemRarityName = "Legendary"; } else if(itemRarity == 3) { itemRarityName = "Epic"; } else if (itemRarity == 2) { itemRarityName = "Rare"; } else if (itemRarity == 1) { itemRarityName = "Uncommon"; } else {itemRarityName = "Common";} } } package com.mysticalmod.capabilities.item; import com.mysticalmod.MysticalMod; import com.mysticalmod.capabilities.ColorConstants; import net.minecraft.network.chat.Component; //import net.minecraft.world.entity.player.Player; //import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = MysticalMod.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE) public class GameplayEvents { @SubscribeEvent public static void displayAttributes(final ItemTooltipEvent event) { event.getItemStack().getCapability(CapabilityItemLvl.ITEM_LVL_CAPABILITY).ifPresent(lvl -> { DefaultItemLvl lvl1 = (DefaultItemLvl) lvl; event.getToolTip().add(Component.literal(ColorConstants.BOLD + "Level " + lvl1.getItemLvl())); event.getToolTip().add(Component.literal(lvl1.getRarityAndColor() + " " + Math.round((lvl1.getRarityMultiplier()-1)*100) + "% Boost")); }); } } package com.mysticalmod.capabilities.item; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; public interface ItemLvl { void determineLvl(int xp, Player player, ItemStack item); int getItemLvl(); void setItemLvl(int amount); int getItemRarity(); void setItemRarity(int amount); String getRarity(); String getRarityAndColor(); void generateRarity(); float getRarityMultiplier(); } package com.mysticalmod.capabilities.item; import java.util.Collection; import java.util.UUID; import com.mysticalmod.MysticalMod; import com.mysticalmod.capabilities.player.CapabilityPlayerSkills; import com.mysticalmod.capabilities.player.DefaultPlayerSkills; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.ai.attributes.Attribute; import net.minecraft.world.entity.ai.attributes.AttributeModifier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; import net.minecraftforge.event.AttachCapabilitiesEvent; import net.minecraftforge.event.ItemAttributeModifierEvent; import net.minecraftforge.event.entity.player.PlayerEvent.ItemCraftedEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = MysticalMod.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE) public class ItemLvlEventHandler { protected static final UUID BASE_ATTACK_DAMAGE_UUID = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF"); @SubscribeEvent public static void onAttachCapabilitiesEvent(AttachCapabilitiesEvent<ItemStack> event) { if (event.getObject().isEnchantable()) { ItemLvlProvider providerlvl = new ItemLvlProvider(); event.addCapability(new ResourceLocation(MysticalMod.MODID, "mysticalmod"), providerlvl); } } @SubscribeEvent public void registerCaps(RegisterCapabilitiesEvent event) { event.register(ItemLvl.class); } @SubscribeEvent public static void setLevel(final ItemCraftedEvent event) { if (event.getCrafting().isEnchantable() && !event.getEntity().level.isClientSide) { event.getCrafting().getCapability(CapabilityItemLvl.ITEM_LVL_CAPABILITY).ifPresent(lvl -> { event.getEntity().getCapability(CapabilityPlayerSkills.PLAYER_STATS_CAPABILITY).ifPresent(skills -> { DefaultItemLvl lvl1 = (DefaultItemLvl) lvl; DefaultPlayerSkills actualSkills = (DefaultPlayerSkills) skills; lvl1.determineLvl(actualSkills.combatLvl, event.getEntity(), event.getCrafting()); lvl1.generateRarity(); //Display String oldName = event.getCrafting().getDisplayName().getString(); event.getCrafting().setHoverName(Component.literal("Lvl " + lvl1.getItemLvl() + " " + lvl1.getRarityAndColor() + " " + oldName)); System.out.println(lvl1.getRarity()); }); }); } } @SubscribeEvent public static void updateItemAttributes(ItemAttributeModifierEvent event) { event.getItemStack().getCapability(CapabilityItemLvl.ITEM_LVL_CAPABILITY).ifPresent(lvl -> { DefaultItemLvl lvl1 = (DefaultItemLvl) lvl; if (event.getSlotType() == EquipmentSlot.MAINHAND) { event.clearModifiers(); double baseDamage = getAttribute(event.getItemStack(), event, Attributes.ATTACK_DAMAGE); //double baseSpeed = getAttribute(event.getItemStack(), event, Attributes.ATTACK_SPEED); //System.out.println(baseSpeed); double actualDamage = (baseDamage+(lvl1.getItemLvl()*0.25))*lvl1.getRarityMultiplier()-baseDamage; event.addModifier(Attributes.ATTACK_DAMAGE, new AttributeModifier("Weapon modifier", actualDamage, AttributeModifier.Operation.ADDITION)); //event.addModifier(Attributes.ATTACK_SPEED, new AttributeModifier("Weapon modifier", 4+baseSpeed, AttributeModifier.Operation.ADDITION)); } }); } private static double getAttribute(ItemStack stack, ItemAttributeModifierEvent event, Attribute attribute) { Collection<AttributeModifier> collection = event.getOriginalModifiers().get(attribute); if (!collection.isEmpty()) { AttributeModifier attributemodifier = collection.iterator().next(); double damage = attributemodifier.getAmount(); return damage; } return 0; } } package com.mysticalmod.capabilities.item; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilitySerializable; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.network.PacketDistributor; import javax.annotation.Nonnull; import javax.annotation.Nullable; import com.mysticalmod.network.ClientboundItemLvlUpdateMessage; import com.mysticalmod.network.SimpleNetworkHandler; public class ItemLvlProvider implements ICapabilitySerializable<CompoundTag> { private final DefaultItemLvl lvl = new DefaultItemLvl(); private final LazyOptional<ItemLvl> itemLvlOptional = LazyOptional.of(() -> lvl); public void invalidate() { itemLvlOptional.invalidate(); } @Nonnull @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) { return itemLvlOptional.cast(); } @Override public CompoundTag serializeNBT() { if (CapabilityItemLvl.ITEM_LVL_CAPABILITY == null) { return new CompoundTag(); } else { CompoundTag compoundNBT = new CompoundTag(); compoundNBT.putInt("itemLvl", lvl.getItemLvl()); compoundNBT.putInt("itemRarity", lvl.getItemRarity()); return compoundNBT; } } @Override public void deserializeNBT(CompoundTag nbt) { if (CapabilityItemLvl.ITEM_LVL_CAPABILITY != null) { int itemLvl = nbt.getInt("itemLvl"); int itemRarity = nbt.getInt("itemRarity"); lvl.setItemLvl(itemLvl); lvl.setItemRarity(itemRarity); } } public static void levelClientUpdate(Player player, ItemStack updateItem) { if (!player.level.isClientSide()) { ServerPlayer serverPlayer = (ServerPlayer) player; ItemStack item = updateItem; item.getCapability(CapabilityItemLvl.ITEM_LVL_CAPABILITY).ifPresent(cap -> SimpleNetworkHandler.INSTANCE.send(PacketDistributor.PLAYER.with(() -> serverPlayer), new ClientboundItemLvlUpdateMessage(cap.getItemLvl(), cap.getItemRarity()))); } } } package com.mysticalmod; import com.mojang.logging.LogUtils; import com.mysticalmod.network.SimpleNetworkHandler; import com.mysticalmod.painting.ModPaintings; import net.minecraft.client.Minecraft; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.event.server.ServerStartingEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.registries.ForgeRegistries; import org.slf4j.Logger; @Mod(MysticalMod.MODID) public class MysticalMod { public static final String MODID = "mysticalmod"; private static final Logger LOGGER = LogUtils.getLogger(); public MysticalMod() { IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); ModPaintings.register(modEventBus); modEventBus.addListener(this::commonSetup); MinecraftForge.EVENT_BUS.register(this); } private void commonSetup(final FMLCommonSetupEvent event) { event.enqueueWork(SimpleNetworkHandler::init); LOGGER.info("HELLO FROM COMMON SETUP"); LOGGER.info("DIRT BLOCK >> {}", ForgeRegistries.BLOCKS.getKey(Blocks.DIRT)); } @SubscribeEvent public void onServerStarting(ServerStartingEvent event) { LOGGER.info("HELLO from server starting"); } @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public static class ClientModEvents { @SubscribeEvent public static void onClientSetup(FMLClientSetupEvent event) { LOGGER.info("HELLO FROM CLIENT SETUP"); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); } } } package com.mysticalmod.capabilities; import com.mysticalmod.MysticalMod; import com.mysticalmod.capabilities.item.ItemLvlEventHandler; import com.mysticalmod.capabilities.player.PlayerSkillsEventHandler; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; @Mod.EventBusSubscriber(modid = MysticalMod.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class CommonEBS { @SubscribeEvent public static void onStaticCommonSetup(FMLCommonSetupEvent event) { MinecraftForge.EVENT_BUS.register(new ItemLvlEventHandler()); MinecraftForge.EVENT_BUS.register(new PlayerSkillsEventHandler()); } } package com.mysticalmod.network; import net.minecraft.client.Minecraft; import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.network.NetworkDirection; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; import com.mysticalmod.capabilities.item.CapabilityItemLvl; public class ClientboundItemLvlUpdateMessage implements INormalMessage { int ITEM_LVL; int ITEM_RARITY; public ClientboundItemLvlUpdateMessage(int level, int mining_xp) { this.ITEM_LVL = level; this.ITEM_RARITY = mining_xp; } public ClientboundItemLvlUpdateMessage(FriendlyByteBuf buf) { ITEM_LVL = buf.readInt(); ITEM_RARITY = buf.readInt(); } @Override public void toBytes(FriendlyByteBuf buf) { buf.writeInt(ITEM_LVL); buf.writeInt(ITEM_RARITY); } @Override public void process(Supplier<NetworkEvent.Context> context) { //This method is for when information is received by the intended end (i.e, client in this case) //We can ignore login to server/client for NetworkDirection, its used for internal forge stuff //Remember that client/server side rules apply here //Access client stuff only in client, otherwise you will crash MC if (context.get().getDirection() == NetworkDirection.PLAY_TO_CLIENT) { context.get().enqueueWork(() -> Minecraft.getInstance().player.getMainHandItem() .getCapability(CapabilityItemLvl.ITEM_LVL_CAPABILITY). ifPresent(cap -> { //do stuff with the info, such as mainly syncing info for the client-side gui cap.setItemLvl(ITEM_LVL); cap.setItemRarity(ITEM_RARITY); })); } } } package com.mysticalmod.network; import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; //A helper class to make packets easier public interface INormalMessage { //FriendlyByteBuffer is nbt, fancy nbt basically void toBytes(FriendlyByteBuf buf); void process(Supplier<NetworkEvent.Context> context); } 😄 Hello recently started on an RPG styled mod and I have a capability all set up and works great in Eclipse, after booting up a server however and finding that the capabilites were not synced I messed around with creating a packet handler based off of somebody elses code but can't figure out what isn't working, no errors my items levels just aren't synced at all. The name on the server has the correct level and rarity but then the attributes that are based off of the capability are just the defaults.
  3. Hey I was wondering if you could take a look at my post, I see your name everywhere I looked while trying to fix this

  4. Never made a post on here before so hopefully those files are readable, been trying to figure out what is going on here, never made custom armor model before so basically just going off of outdated tutorials and changing things as I go, the model works in game but there are some serious issues package com.chickenwand3.farmbot.objects; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import net.minecraft.client.renderer.entity.model.BipedModel; import net.minecraft.client.renderer.model.ModelRenderer; import net.minecraft.entity.LivingEntity; import net.minecraft.inventory.EquipmentSlotType; import net.minecraft.util.ResourceLocation; public abstract class ArmorBaseModel extends BipedModel<LivingEntity>{ protected final ModelRenderer armorHead; protected final ModelRenderer armorBody; protected final ModelRenderer armorRightArm; protected final ModelRenderer armorLeftArm; protected final ModelRenderer armorRightLeg; protected final ModelRenderer armorRightBoot; protected final ModelRenderer armorLeftLeg; protected final ModelRenderer armorLeftBoot; private String texture; public ArmorBaseModel(int textureWidth, int textureHeight, ResourceLocation texture) { super(1F); this.texWidth = textureWidth; this.texHeight = textureHeight; this.texture = texture.toString(); armorHead = new ModelRenderer(this); armorHead.setPos(0.0F, 0.0F, 0.0F); head.addChild(armorHead); armorBody = new ModelRenderer(this); armorBody.setPos(0.0F, 0.0F, 0.0F); body.addChild(armorBody); armorRightArm = new ModelRenderer(this); armorRightArm.setPos(0.0F, 0.0F, 0.0F); rightArm.addChild(armorRightArm); armorLeftArm = new ModelRenderer(this); armorLeftArm.setPos(0.0F, 0.0F, 0.0F); leftArm.addChild(armorLeftArm); armorRightLeg = new ModelRenderer(this); armorRightLeg.setPos(0.0F, 0.0F, 0.0F); rightLeg.addChild(armorRightLeg); armorLeftLeg = new ModelRenderer(this); armorLeftLeg.setPos(0.0F, 0.0F, 0.0F); leftLeg.addChild(armorLeftLeg); armorRightBoot = new ModelRenderer(this); armorRightBoot.setPos(0.0F, 0.0F, 0.0F); rightLeg.addChild(armorRightBoot); armorLeftBoot = new ModelRenderer(this); armorLeftBoot.setPos(0.0F, 0.0F, 0.0F); leftLeg.addChild(armorLeftBoot); setupArmorParts(); } public abstract void setupArmorParts(); public final String getTexture(){ return this.texture; } /** * Feel free to override this method as needed. * It's just required to hide armor parts depending on the equipment slot */ @SuppressWarnings("rawtypes") public BipedModel applySlot(EquipmentSlotType slot){ armorHead.visible = false; armorBody.visible = false; armorRightArm.visible = false; armorLeftArm.visible = false; armorRightLeg.visible = false; armorLeftLeg.visible = false; armorRightBoot.visible = false; armorLeftBoot.visible = false; switch(slot){ case HEAD: armorHead.visible = true; break; case CHEST: armorBody.visible = true; armorRightArm.visible = true; armorLeftArm.visible = true; break; case LEGS: armorRightLeg.visible = true; armorLeftLeg.visible = true; break; case FEET: armorRightBoot.visible = true; armorLeftBoot.visible = true; break; default: break; } return this; } @SuppressWarnings("rawtypes") public final ArmorBaseModel applyEntityStats(BipedModel defaultArmor){ this.crouching = defaultArmor.crouching; this.rightArmPose = defaultArmor.rightArmPose; this.leftArmPose = defaultArmor.leftArmPose; return this; } public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { super.copyPropertiesTo(this); copyModelAngles(this.head, this.armorHead); copyModelAngles(this.body, this.armorBody); copyModelAngles(this.rightArm, this.armorRightArm); copyModelAngles(this.leftArm, this.armorLeftArm); copyModelAngles(this.rightLeg, this.armorRightLeg); copyModelAngles(this.leftLeg, this.armorLeftLeg); copyModelAngles(this.rightLeg, this.armorRightBoot); copyModelAngles(this.leftLeg, this.armorLeftBoot); matrixStack.pushPose(); if(crouching) matrixStack.translate(0, 0.2, 0); this.armorHead.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); this.armorBody.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); this.armorRightArm.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); this.armorLeftArm.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); this.armorRightLeg.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); this.armorLeftLeg.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); this.armorRightBoot.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); this.armorLeftBoot.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); matrixStack.popPose(); } public final void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.xRot = x; modelRenderer.yRot = y; modelRenderer.zRot = z; } private final void copyModelAngles(ModelRenderer in, ModelRenderer out){ out.xRot = in.xRot; out.yRot = in.yRot; out.zRot = in.zRot; } } package com.chickenwand3.farmbot.objects; import net.minecraft.client.renderer.entity.model.BipedModel; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.inventory.EquipmentSlotType; import net.minecraft.item.ArmorItem; import net.minecraft.item.IArmorMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class ArmorRenderer extends ArmorItem{ private ArmorBaseModel armorModel; public ArmorRenderer(IArmorMaterial material, EquipmentSlotType equipmentSlot, Item.Properties properties, ArmorBaseModel armorModel) { super(material, equipmentSlot, properties); this.armorModel = armorModel; } @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public final BipedModel getArmorModel(LivingEntity entity, ItemStack itemStack, EquipmentSlotType armorSlot, BipedModel defaultArmor) { return armorModel.applyEntityStats(defaultArmor).applySlot(armorSlot); } public final String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) { return armorModel.getTexture(); } } package com.chickenwand3.farmbot.objects; import net.minecraft.util.ResourceLocation; public class MyCustomArmorModel extends ArmorBaseModel { public MyCustomArmorModel() { super(128, 128, new ResourceLocation("farmbot:textures/models/armor/soularmormodel.png")); } @Override public void setupArmorParts() { armorHead.setPos(0.0F, 0.0F, 0.0F); head.addChild(armorHead); armorHead.texOffs(58, 30).addBox(-5.0F, -8.0F, -5.0F, 2.0F, 8.0F, 1.0F, 0.0F, false); armorHead.texOffs(18, 11).addBox(-5.0F, -8.0F, -4.0F, 1.0F, 8.0F, 8.0F, 0.0F, false); armorHead.texOffs(0, 11).addBox(4.0F, -8.0F, -4.0F, 1.0F, 8.0F, 8.0F, 0.0F, false); armorHead.texOffs(30, 0).addBox(-5.0F, -8.0F, 4.0F, 10.0F, 8.0F, 1.0F, 0.0F, false); armorHead.texOffs(58, 21).addBox(3.0F, -8.0F, -5.0F, 2.0F, 8.0F, 1.0F, 0.0F, false); armorHead.texOffs(28, 16).addBox(-3.0F, -8.0F, -5.0F, 2.0F, 2.0F, 1.0F, 0.0F, false); armorHead.texOffs(0, 0).addBox(-5.0F, -9.0F, -5.0F, 10.0F, 1.0F, 10.0F, 0.0F, false); armorHead.texOffs(20, 15).addBox(1.0F, -8.0F, -5.0F, 2.0F, 2.0F, 1.0F, 0.0F, false); armorHead.texOffs(28, 11).addBox(-1.0F, -8.0F, -5.0F, 2.0F, 4.0F, 1.0F, 0.0F, false); armorBody.setPos(0.0F, 0.0F, 0.0F); body.addChild(armorBody); armorBody.texOffs(18, 27).addBox(-4.0F, 0.0F, 2.0F, 8.0F, 12.0F, 1.0F, 0.0F, false); armorBody.texOffs(0, 27).addBox(-4.0F, 0.0F, -3.0F, 8.0F, 12.0F, 1.0F, 0.0F, false); armorRightArm.setPos(-7.0F, 0.0F, 0.0F); rightArm.addChild(armorRightArm); armorRightArm.texOffs(0, 40).addBox(2.0F, -2.0F, -3.0F, 6.0F, 12.0F, 1.0F, 0.0F, false); armorRightArm.texOffs(36, 37).addBox(2.0F, -2.0F, 2.0F, 6.0F, 12.0F, 1.0F, 0.0F, false); armorRightArm.texOffs(50, 5).addBox(2.0F, -2.0F, -2.0F, 1.0F, 12.0F, 4.0F, 0.0F, false); armorRightArm.texOffs(46, 46).addBox(7.0F, -2.0F, -2.0F, 1.0F, 12.0F, 4.0F, 0.0F, false); armorLeftArm.setPos(12.0F, 0.0F, 0.0F); leftArm.addChild(armorLeftArm); armorLeftArm.texOffs(36, 24).addBox(-13.0F, -2.0F, -3.0F, 6.0F, 12.0F, 1.0F, 0.0F, false); armorLeftArm.texOffs(36, 11).addBox(-13.0F, -2.0F, 2.0F, 6.0F, 12.0F, 1.0F, 0.0F, false); armorLeftArm.texOffs(24, 40).addBox(-13.0F, -2.0F, -2.0F, 1.0F, 12.0F, 4.0F, 0.0F, false); armorLeftArm.texOffs(14, 40).addBox(-8.0F, -2.0F, -2.0F, 1.0F, 12.0F, 4.0F, 0.0F, false); armorRightLeg.setPos(0.0F, 0.0F, 0.0F); rightLeg.addChild(armorRightLeg); armorRightLeg.texOffs(50, 29).addBox(6.0F, 0.0F, -2.0F, 0.0F, 12.0F, 4.0F, 0.0F, false); armorRightLeg.texOffs(50, 17).addBox(2.0F, 0.0F, -2.0F, 0.0F, 12.0F, 4.0F, 0.0F, false); armorRightLeg.texOffs(56, 45).addBox(2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 0.0F, 0.0F, false); armorRightLeg.texOffs(24, 56).addBox(2.0F, 0.0F, 2.0F, 4.0F, 12.0F, 0.0F, 0.0F, false); armorRightBoot.setPos(0.0F, 0.0F, 0.0F); rightLeg.addChild(armorRightBoot); armorRightBoot.texOffs(52, 0).addBox(2.0F, 9.0F, -3.0F, 4.0F, 3.0F, 1.0F, 0.0F, false); armorRightBoot.texOffs(14, 11).addBox(2.0F, 12.0F, -2.0F, 4.0F, 0.0F, 4.0F, 0.0F, false); armorRightBoot.texOffs(0, 14).addBox(2.0F, 9.0F, 2.0F, 4.0F, 3.0F, 0.0F, 0.0F, false); armorRightBoot.texOffs(56, 52).addBox(6.0F, 9.0F, -3.0F, 0.0F, 3.0F, 5.0F, 0.0F, false); armorRightBoot.texOffs(56, 0).addBox(2.0F, 9.0F, -3.0F, 0.0F, 3.0F, 5.0F, 0.0F, false); armorLeftLeg.setPos(-4.0F, 0.0F, 0.0F); leftLeg.addChild(armorLeftLeg); armorLeftLeg.texOffs(16, 56).addBox(-2.0F, 0.0F, 2.0F, 4.0F, 12.0F, 0.0F, 0.0F, false); armorLeftLeg.texOffs(8, 56).addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 0.0F, 0.0F, false); armorLeftLeg.texOffs(0, 49).addBox(-2.0F, 0.0F, -2.0F, 0.0F, 12.0F, 4.0F, 0.0F, false); armorLeftLeg.texOffs(34, 46).addBox(2.0F, 0.0F, -2.0F, 0.0F, 12.0F, 4.0F, 0.0F, false); armorLeftBoot.setPos(-4.0F, 0.0F, 0.0F); leftLeg.addChild(armorLeftBoot); armorLeftBoot.texOffs(10, 10).addBox(-2.0F, 9.0F, -3.0F, 0.0F, 3.0F, 5.0F, 0.0F, false); armorLeftBoot.texOffs(0, 0).addBox(2.0F, 9.0F, -3.0F, 0.0F, 3.0F, 5.0F, 0.0F, false); armorLeftBoot.texOffs(0, 11).addBox(-2.0F, 9.0F, 2.0F, 4.0F, 3.0F, 0.0F, 0.0F, false); armorLeftBoot.texOffs(0, 0).addBox(-2.0F, 9.0F, -3.0F, 4.0F, 3.0F, 1.0F, 0.0F, false); armorLeftBoot.texOffs(6, 11).addBox(-2.0F, 12.0F, -2.0F, 4.0F, 0.0F, 4.0F, 0.0F, false); } } It renders the armor that I want but also adds some of my texture mashed of the face of the player??
×
×
  • Create New...

Important Information

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