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!
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/:?]
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.removeStackFromSlot(slot);
entity.inventory.setInventorySlotContents(slot, new ItemStack(items[1]));
entity.playSound(SoundEvents.BLOCK_ANVIL_LAND, 0.5F, 0.5F);
}
}
}
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.
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.
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!
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.
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!
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.
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.
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.
EntitySaytr
public class EntitySaytr extends EntityIronGolem {
@Nullable
Village village;
private int attackTimer;
public EntitySaytr(World worldIn) {
super(worldIn);
this.setSize(0.6F, 2.05F);
}
@Override
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);
}
}));
}
public void transformHeldFull3DItemLayer()
{
GlStateManager.translate(0.0F, 0.1875F, 0.0F);
}
}
ModelSaytr
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;
/**
* 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;
}
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.
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.
0
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:
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/:?]
0
Bump
0
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:
1
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
https://mcrpw.github.io/
0
*Bump*
0
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
0
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!
0
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.
0
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!
0
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
0
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.
0
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.
EntitySaytr
RenderSaytr
ModelSaytr
0
Bump
0
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:
ModItems
TestArmor
TestCustomArmorModel2
Any help you could bring would be great. Thanks!
0
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.