• 0

    posted a message on Replacing Slot with New Item Glitched

    So I found a work around for the problem I was having, but now an error is popping up. I've switched it from replacing the item in code to replacing the item with the "replaceitem" command in 1.12. It is working as intended, but each time this pops up. Any ideas? Thanks!

    New Code:

    MinecraftServer mcserv = FMLCommonHandler.instance().getMinecraftServerInstance();
    if (mcserv != null) {
        mcserv.getCommandManager().executeCommand(entity, "replaceitem entity " + entity.getName() + " slot.weapon.mainhand " + itemsOn[1].getRegistryName());

    Error Message:

    [18:50:09] [Client thread/WARN] [minecraft/CommandHandler]: Couldn't process command: replaceitem entity BloxBoss6 slot.weapon.mainhand pjom:sword_riptide

    java.lang.NullPointerException: null at net.minecraft.entity.player.EntityPlayer.sendCommandFeedback(EntityPlayer.java:2622) ~[EntityPlayer.class:?] at net.minecraft.command.ServerCommandManager.notifyListener(ServerCommandManager.java:127) ~[ServerCommandManager.class:?] at net.minecraft.command.CommandBase.notifyCommandListener(CommandBase.java:941) ~[CommandBase.class:?] at net.minecraft.command.CommandBase.notifyCommandListener(CommandBase.java:934) ~[CommandBase.class:?] at net.minecraft.command.CommandReplaceItem.execute(CommandReplaceItem.java:177) ~[CommandReplaceItem.class:?] at net.minecraft.command.CommandHandler.tryExecute(CommandHandler.java:126) [CommandHandler.class:?] at net.minecraft.command.CommandHandler.executeCommand(CommandHandler.java:98) [CommandHandler.class:?] at bloxboss6.mod.util.keybinds.SwapTool.swapMethod(SwapTool.java:43) [SwapTool.class:?] at bloxboss6.mod.util.keybinds.KeyInputHandler.executeSwap(KeyInputHandler.java:28) [KeyInputHandler.class:?] at bloxboss6.mod.util.keybinds.KeyInputHandler.onKeyInput(KeyInputHandler.java:18) [KeyInputHandler.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_19_KeyInputHandler_onKeyInput_KeyInputEvent.invoke(.dynamic) [?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:565) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2144) [Minecraft.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1935) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1188) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:442) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?]

    Posted in: Modification Development
  • 0

    posted a message on Replacing Slot with New Item Glitched


    Posted in: Modification Development
  • 0

    posted a message on Replacing Slot with New Item Glitched

    Hey all, I have some items that I'm trying to replace with a new one. I have gotten them to be able to switch, but the problem comes with actually using the switched item. Basically, imagine the original item is a pickaxe and I'm replacing it with a sword. When I switch the game knows and gives me the sword, but when I go to break a block with the sword, it breaks the block even though swords cannot and I have it coded so that it won't normally. Alternatively, if I have the sword first, and switch to the pickaxe, it won't let me break any blocks at all. But both times it knows it should be doing the opposite. When it isn't supposed to break, there is no breaking animation, the block just disappears. And when the block is supposed to be broken it disappears and then reappears almost instantly.

    Any help would be greatly appreciated.

    Here's my code:

    public void swapMethod(Item item, EntityPlayer entity) {
    if (compatible(item)) {
    Item[] items = counterpart(item);
    if (items[0] != null) {
    int slot = entity.inventory.getSlotFor(new ItemStack(items[0]));
    entity.inventory.setInventorySlotContents(slot, new ItemStack(items[1]));
    entity.playSound(SoundEvents.BLOCK_ANVIL_LAND, 0.5F, 0.5F);

    Posted in: Modification Development
  • 1

    posted a message on (1.7.10) Is there a way to change the texture of modded items?

    I remember there was a way to use a resource pack to retexture modded blocks and items, but I don't know when the functionality was added. If I remember correctly the application was called either Resource Pack Workbench or Resource Pack Manager.

    Hope this helps!

    Edit: I actually found the link! Here you go


    Posted in: Modification Development
  • 0

    posted a message on Struggling With OBJ files


    Posted in: Modification Development
  • 0

    posted a message on Struggling With OBJ files

    I want to add a custom sword model using obj as it is much easier to make a smooth model in blender than it is in blockbench. I originally made a basic sword model in blockbench but I was wanting something more detailed than was possible. At the moment I get some error messages while loading Minecraft, but in the game, all I can see is the normal "model is missing" purple and black square.

    Any help would be greatly appreciated!

    Important Files:

    Error Message

    Item File

    ItemInit File

    PreInit File

    Blockstate File

    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace Amount Slots

    Well, after troubleshooting and googling lots about maps and hashmaps, I decided I was confusing myself and decided to mess around with some if statements and figured out away. It's not pretty, and I would definitely like to fix it and make it look a little better, but for now, it works and that's what I need. If you want to check, all the code is in my TileEntity class. Thank you so much for all the help!

    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace Amount Slots

    I've updated the github with my attempts, I don't have any language errors so I'm pretty sure I got it working in ForgeRecipes but I must have messed something up in TileEntityForge because It is checking for 2 items before smelting and removing two every time and not actually taking the count that I added.

    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace Amount Slots

    Are you meaning using a new hashmap? Cause if so I'm 98% sure I can set that up properly, I'm now just confused about how to get it to check in canSmelt(). I'll try messing around and see what I can do though. Thanks!

    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace Amount Slots

    I followed a tutorial off of youtube to build a custom furnace that has 2 inputs. I made 1 of the inputs be for casts and the other be for the metal to cast. I want to be able to set the amount of metal necessary for casting, but everything I have tried on my own has not worked. The furnace works in every other way, it just always takes only one item and won't wait until there is more than one item. Any help would be greatly appreciated.

    All Files Used for Furnace

    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Hold Weapon Help Please!

    At the moment I have just added a model of the sword to him so he looks like he is holding it, but he still isn't actually holding it. Would still love help to be able to fix this issue.

    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Hold Weapon Help Please!

    I'm working on creating a satyr in Minecraft, and I want him to hold a weapon. I have tried searching for tutorials, and none of them have worked for my specific model. They either say to just extend everything to its Biped equivalent (which I have done) and then to just look through the code and see what adds items (which I've also done and hasn't worked so I deleted most of the mess of code).

    Any help that can be given would be greatly appreciated.


    public class EntitySaytr extends EntityIronGolem {

    Village village;
    private int attackTimer;

    public EntitySaytr(World worldIn) {
    this.setSize(0.6F, 2.05F);

    protected void initEntityAI() {
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));

    this.tasks.addTask(1, new EntityAIAttackMelee(this, 1.0D, true));
    this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
    this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
    this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
    this.tasks.addTask(5, new EntityAILookAtVillager(this));
    this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 0.6D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIDefendVillage(this));
    this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 10, false, true, new Predicate<EntityLiving>() {
    public boolean apply(@Nullable EntityLiving p_apply_1_) {
    return p_apply_1_ != null && IMob.VISIBLE_MOB_SELECTOR.apply(p_apply_1_) && !(p_apply_1_ instanceof EntityCreeper);

    protected void applyEntityAttributes() {

    protected void collideWithEntity(Entity entityIn) {
    if (entityIn instanceof IMob && !(entityIn instanceof EntityCreeper) && this.getRNG().nextInt(20) == 0) {
    this.setAttackTarget((EntityLivingBase) entityIn);


    public void onLivingUpdate() {

    if (this.attackTimer > 0) {

    public boolean canAttackClass(Class<? extends EntityLivingBase> cls) {
    if (this.isPlayerCreated() && EntityPlayer.class.isAssignableFrom(cls)) {
    return false;
    } else {
    return cls != EntityCreeper.class && super.canAttackClass(cls);

    public boolean attackEntityAsMob(Entity entityIn)
    this.attackTimer = 10;
    this.world.setEntityState(this, (byte)4);
    boolean flag = entityIn.attackEntityFrom(DamageSource.causeMobDamage(this), (float)(7 + this.rand.nextInt(15)));

    if (flag)
    entityIn.motionX += 0.3D;
    this.applyEnchantments(this, entityIn);

    this.playSound(SoundEvents.ENTITY_PLAYER_ATTACK_SWEEP, 0.5F, 1.0F);
    return flag;

    protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty)
    this.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(ItemInit.SWORD_CB));

    public float getEyeHeight() {
    return 1.725F;

    protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();

    protected SoundEvent getHurtSound(DamageSource source) {
    return super.getHurtSound(source);

    protected SoundEvent getDeathSound() {
    return super.getDeathSound();


    public class RenderSaytr extends RenderBiped<EntitySaytr> {

    public static final ResourceLocation TEXTURES = new ResourceLocation(Reference.MODID + ":textures/entity/saytr.png");

    public RenderSaytr(RenderManager manager) {

    super(manager, new ModelSaytr(), 0.5F);
    LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this) {
    protected void initArmor() {
    this.modelLeggings = new ModelSaytr(0.5F, true);
    this.modelArmor = new ModelSaytr(1.0F, true);
    this.addLayer(new LayerHeldItem(this));


    protected ResourceLocation getEntityTexture(EntitySaytr entity) {
    return TEXTURES;

    protected void applyRotations(EntitySaytr entityLiving, float p_77043_2_, float rotationYaw, float partialTicks) {
    super.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks);

    public void transformHeldFull3DItemLayer()
    GlStateManager.translate(0.0F, 0.1875F, 0.0F);


    public class ModelSaytr extends ModelBiped {
    public ModelRenderer SaytrHead;
    public ModelRenderer SaytrHeadwear;
    public ModelRenderer SaytrBody;
    public ModelRenderer SaytrRightArm;
    public ModelRenderer SaytrLeftArm;
    public ModelRenderer LegJoined;
    public ModelRenderer SaytrRightLeg;
    public ModelRenderer SaytrLeftLeg;
    public ModelRenderer LeftHorn;
    public ModelRenderer RightHorn;
    public ModelRenderer Goatee;
    public ModelRenderer SaytrRightLeg2;
    public ModelRenderer SaytrRightLeg3;
    public ModelRenderer SaytrRightLeg4;
    public ModelRenderer SaytrLeftLeg2;
    public ModelRenderer SaytrLeftLeg3;
    public ModelRenderer SaytrLeftLeg4;

    public ModelSaytr() {
    this.textureWidth = 64;
    this.textureHeight = 32;
    this.SaytrLeftArm = new ModelRenderer(this, 40, 16);
    this.SaytrLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F);
    this.SaytrLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F);
    this.SaytrLeftArm.mirror = true;
    this.SaytrRightLeg2 = new ModelRenderer(this, 2, 20);
    this.SaytrRightLeg2.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrRightLeg2.addBox(-1.85F, 2.0F, -2.9F, 3, 4, 3, 0.0F);
    this.setRotateAngle(SaytrRightLeg2, 0.5101597403579425F, 0.0F, 0.0F);
    this.LegJoined = new ModelRenderer(this, 1, 17);
    this.LegJoined.setRotationPoint(0.0F, 12.0F, 0.0F);
    this.LegJoined.addBox(-2.0F, 0.0F, -1.5F, 4, 2, 3, 0.0F);
    this.SaytrRightLeg4 = new ModelRenderer(this, 0, 26);
    this.SaytrRightLeg4.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrRightLeg4.addBox(-2.35F, 10.0F, -2.0F, 4, 2, 4, 0.0F);
    this.SaytrLeftLeg2 = new ModelRenderer(this, 2, 20);
    this.SaytrLeftLeg2.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrLeftLeg2.addBox(-1.85F, 2.0F, -2.9F, 3, 4, 3, 0.0F);
    this.setRotateAngle(SaytrLeftLeg2, 0.5101597403579425F, 0.0F, 0.0F);
    this.SaytrLeftLeg2.mirror = true;
    this.SaytrBody = new ModelRenderer(this, 16, 16);
    this.SaytrBody.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.0F);
    this.SaytrLeftLeg = new ModelRenderer(this, 0, 16);
    this.SaytrLeftLeg.setRotationPoint(1.9F, 12.0F, 0.0F);
    this.SaytrLeftLeg.addBox(-2.25F, 0.0F, -2.0F, 4, 4, 4, 0.0F);
    this.SaytrLeftLeg.mirror = true;
    this.Goatee = new ModelRenderer(this, 57, 24);
    this.Goatee.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.Goatee.addBox(-1.0F, -0.5F, -4.25F, 2, 1, 1, 0.0F);
    this.SaytrLeftLeg3 = new ModelRenderer(this, 2, 20);
    this.SaytrLeftLeg3.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrLeftLeg3.addBox(-1.85F, 4.2F, 1.4F, 3, 6, 3, 0.0F);
    this.setRotateAngle(SaytrLeftLeg3, -0.28431413514987625F, 0.0F, 0.0F);
    this.SaytrLeftLeg3.mirror = true;
    this.SaytrHead = new ModelRenderer(this, 0, 0);
    this.SaytrHead.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F);
    this.SaytrRightLeg = new ModelRenderer(this, 0, 16);
    this.SaytrRightLeg.setRotationPoint(-1.9F, 12.0F, 0.0F);
    this.SaytrRightLeg.addBox(-2.25F, 0.0F, -2.0F, 4, 4, 4, 0.0F);
    this.SaytrRightLeg3 = new ModelRenderer(this, 2, 20);
    this.SaytrRightLeg3.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrRightLeg3.addBox(-1.85F, 4.2F, 1.4F, 3, 6, 3, 0.0F);
    this.setRotateAngle(SaytrRightLeg3, -0.28431413514987625F, 0.0F, 0.0F);
    this.LeftHorn = new ModelRenderer(this, 58, 20);
    this.LeftHorn.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.LeftHorn.addBox(3.25F, -8.75F, 0.0F, 1, 2, 1, 0.0F);
    this.LeftHorn.mirror = true;
    this.RightHorn = new ModelRenderer(this, 58, 20);
    this.RightHorn.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.RightHorn.addBox(-4.3F, -8.8F, 0.0F, 1, 2, 1, 0.0F);
    this.SaytrLeftLeg4 = new ModelRenderer(this, 0, 26);
    this.SaytrLeftLeg4.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrLeftLeg4.addBox(-2.35F, 10.0F, -2.0F, 4, 2, 4, 0.0F);
    this.SaytrLeftLeg4.mirror = true;
    this.SaytrHeadwear = new ModelRenderer(this, 32, 0);
    this.SaytrHeadwear.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.5F);
    this.SaytrRightArm = new ModelRenderer(this, 40, 16);
    this.SaytrRightArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
    this.SaytrRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F);

    public ModelSaytr(float modelSize, boolean p_i1168_2_)
    super(modelSize, 0.0F, 64, p_i1168_2_ ? 32 : 64);

    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {

    * This is a helper function from Tabula to set the rotation of model parts
    public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
    modelRenderer.rotateAngleX = x;
    modelRenderer.rotateAngleY = y;
    modelRenderer.rotateAngleZ = z;

    public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) {
    this.SaytrLeftLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
    this.SaytrRightLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount;

    this.SaytrRightArm.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount / 2;
    this.SaytrLeftArm.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount / 2;

    this.SaytrHead.rotateAngleY = netHeadYaw * 0.017453292F;
    this.SaytrHead.rotateAngleX = headPitch * 0.017453292F;
    this.SaytrHeadwear.rotateAngleY = netHeadYaw * 0.017453292F;
    this.SaytrHead.rotateAngleX = headPitch * 0.017453292F;

    Posted in: Modification Development
  • 0

    posted a message on CUSTOM 3D MODEL HELP PLZ


    Posted in: Modification Development
  • 0

    posted a message on CUSTOM 3D MODEL HELP PLZ

    Hey Guys,

    So basically, I'm working on making a Greek Armor Set. I want the basic Minecraft Armor Model, with an added "Mohawk" to the helmet, and Shoulder Guards to the arms. When I add the models though, it just turns out really wrong. The First picture is what I have normally. Then, I thought maybe it had something to do with the ModelBiped Headwear, and so I turned that off and that's how I got the second picture.

    Also, here is the code:

    Any help you could bring would be great. Thanks!

    Posted in: Modification Development
  • 0

    posted a message on How to create a custom armor keybind
    Quote from Bright_Spark»

    For what exactly? This is a combination of a few things: GUIs, key bindings and sending packets

    That's the problem, I don't know which one I need. I shouldn't need a GUI tutorial as I have already made one before. I have watched tons of keybinds tutorials, but none of them seem to work, and then I don't know what sending packets are.
    Posted in: Modification Development
  • To post a comment, please .