Everything posted by loawkise
-
Changing Entity's Model
Ahhh, so I should be using this, right? modelA.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); With all these parameters...
-
Changing Entity's Model
Oh, but then how can I swap between the models?
-
Changing Entity's Model
I was wondering what the best method for changing an entity's model from one to another is, as the only method I can think of is making a massive model file, then hiding the bits I don't want to see.
-
[1.7.2] Switching Between GUIs On Key Press
That doesn't seem to work...
-
[1.7.2] Switching Between GUIs On Key Press
I am going to use the KeyBinding approach as first suggested as it means the button can be changed in the controls menu. But I don't know how to check whether a certain GUI is open and how to open another one inside my KeyHandler class. I haven't really used events that much.
-
[1.7.2] Switching Between GUIs On Key Press
Ahhh, I thought keyPressed didn't exist and I saw keyTyped but wasn't sure it was the same. Thanks.
-
[1.7.2] Switching Between GUIs On Key Press
Which class do you mean by GuiScreen, the actual GUI class I am guessing and I can't find the keyPressed method.
-
[1.7.2] Switching Between GUIs On Key Press
Okay it isn't anything to with that I have just messed something up
-
[1.7.2] Switching Between GUIs On Key Press
I got that working. It just prints a message to the console. But I can't open my GUI anymore like I could before...
-
[1.7.2] Switching Between GUIs On Key Press
I have 2 different GUIs that I want to be able to swap between when the player presses a key inside either of the GUIs. Does anyone know how to do this?
-
[1.7.2] Item Popping Out Of GUI
Worked I believe, thank you.
-
[1.7.2] Item Popping Out Of GUI
Ahh okay, I am doing so now.
-
[1.7.2] Item Popping Out Of GUI
Container Class: public class ContainerCustom extends Container { protected IInventory i; private int playerInventoryX = 70; private int playerInventoryY = 8; public ContainerCustom(InventoryPlayer inventoryPlayer, IInventory c) { i = c; { addSlotToContainer(new SlotCustom(c, 0, 144, -55)); } bindPlayerInventory(inventoryPlayer); } public boolean canInteractWith(EntityPlayer player) { return i.isUseableByPlayer(player); } protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 9; j++) { addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, playerInventoryX + j * 18, playerInventoryY + i * 18)); } } for (int i = 0; i < 9; i++) { addSlotToContainer(new Slot(inventoryPlayer, i, playerInventoryX + i * 18, playerInventoryY + 54 + 4)); } } @Override public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { return null; } @Override public void onContainerClosed(EntityPlayer par1EntityPlayer) { super.onContainerClosed(par1EntityPlayer); this.i.closeInventory(); } } Slot Class: public class SlotCustom extends Slot { public SlotCustom(IInventory inventory, int par2, int par3, int par4) { super(inventory, par2, par3, par4); } @Override public boolean isItemValid(ItemStack itemstack) { return itemstack.getItem() == Items.arrow; } @Override public int getSlotStackLimit() { return 1; } }
-
[1.7.2] Item Popping Out Of GUI
I have made a custom GUI and custom slot, but when I try to click on an item that is inside my custom slot it just falls to the ground instead of following my mouse round like in an inventory. Also it only seems to do it at a certain place. In some places nearer the edge of the screen it will just pop out like before but nearer the center it acts normally.
-
Prevent tamed entity attacking players
In the attackEntityAsMob() method, if it returns true does that mean it will attack that target or it will deal damage to the set target?
-
Prevent tamed entity attacking players
Well I tried using this in the attackEntityAsMob() method but it has no affect: if(par1Entity instanceof EntityPlayer) { return false; }
-
Prevent tamed entity attacking players
The problem is that I have just got 3 target tasks that will make i attack whatever attacks it, its owner or whatever the owner attacks. I want it to be so that if the entity is a player don't try to attack. That is all the AI I have: this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, false)); this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 6.0F, 3.0F)); this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(6, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); this.targetTasks.addTask(2, new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(3, new EntityAIOwnerHurtTarget(this));
-
Prevent tamed entity attacking players
I want my custom entity to never even try to attack the player, if you know what I mean.
-
Prevent tamed entity attacking players
Is there a way to prevent the mob attacking players in the first place because I don't really want them to?
-
Prevent tamed entity attacking players
It didn't have any effect... I am not sure what is causing it.
-
Prevent tamed entity attacking players
My custom tamed entity will attempt to attack a player but it will deal 0 damage. Why does this happen?
-
GUI displays same item in 2 slots
Thanks, I believe I am all set now Can't thank you enough.
-
GUI displays same item in 2 slots
Thanks for explaining it and showing me what to do. It makes a lot more sense now. Once last thing though, I want to check the item in a current slot so how would I go about that?
-
GUI displays same item in 2 slots
Here it is, I am using the one you gave me and I ma trying to adapt it.
-
GUI displays same item in 2 slots
I am just starting to learn how to make GUIs and I have recently made one that has a 2x3 inventory at the top and a 2x1 inventory at the bottom, like the normal inventory just 2 wide. When I put anything in the top left slot it also appears in the bottom left slot and I don't understand why.
IPS spam blocked by CleanTalk.