mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
4f753371c8
5 files changed
+37
-27
No files matched your search
@@ -126,6 +126,7 @@ public class DataDisplay {
|
||||
|
||||
title = nbttagcompound.getString("Title");
|
||||
|
||||
String prevUrl = url;
|
||||
url = nbttagcompound.getString("SkinUrl");
|
||||
|
||||
int prevSkinType = skinType;
|
||||
@@ -143,7 +144,6 @@ public class DataDisplay {
|
||||
}
|
||||
|
||||
String prevTexture = texture;
|
||||
|
||||
texture = nbttagcompound.getString("Texture");
|
||||
|
||||
cloakTexture = nbttagcompound.getString("CloakTexture");
|
||||
@@ -200,7 +200,7 @@ public class DataDisplay {
|
||||
else
|
||||
collidesWith = 1;
|
||||
|
||||
if(prevSkinType != skinType || !texture.equals(prevTexture))
|
||||
if(prevSkinType != skinType || !texture.equals(prevTexture)|| !url.equals(prevUrl))
|
||||
npc.textureLocation = null;
|
||||
npc.updateHitbox();
|
||||
}
|
||||
|
||||
@@ -133,14 +133,18 @@ public class TileScripted extends TileEntity implements IScriptBlockHandler {
|
||||
if(scaleZ <= 0)
|
||||
scaleZ = 1;
|
||||
|
||||
if(compound.hasKey("Text3")) {
|
||||
if(compound.hasKey("Text1"))
|
||||
text1.setNBT(compound.getCompoundTag("Text1"));
|
||||
if(compound.hasKey("Text2"))
|
||||
text2.setNBT(compound.getCompoundTag("Text2"));
|
||||
if(compound.hasKey("Text3"))
|
||||
text3.setNBT(compound.getCompoundTag("Text3"));
|
||||
if(compound.hasKey("Text4"))
|
||||
text4.setNBT(compound.getCompoundTag("Text4"));
|
||||
if(compound.hasKey("Text5"))
|
||||
text5.setNBT(compound.getCompoundTag("Text5"));
|
||||
if(compound.hasKey("Text6"))
|
||||
text6.setNBT(compound.getCompoundTag("Text6"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,31 +16,34 @@ public class ContainerCrate extends Container
|
||||
{
|
||||
this.lowerChestInventory = par2IInventory;
|
||||
this.upperChestInventory = par1IInventory;
|
||||
this.numRows = par2IInventory.getSizeInventory() / 9;
|
||||
par2IInventory.openInventory();
|
||||
int i = (this.numRows - 4) * 18;
|
||||
int j;
|
||||
int k;
|
||||
this.numRows = 0;
|
||||
if(par2IInventory != null && par1IInventory != null){
|
||||
this.numRows = par2IInventory.getSizeInventory() / 9;
|
||||
par2IInventory.openInventory();
|
||||
int i = (this.numRows - 4) * 18;
|
||||
int j;
|
||||
int k;
|
||||
|
||||
for (j = 0; j < this.numRows; ++j)
|
||||
{
|
||||
for (k = 0; k < 9; ++k)
|
||||
for (j = 0; j < this.numRows; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(par2IInventory, k + j * 9, 8 + k * 18, 18 + j * 18));
|
||||
for (k = 0; k < 9; ++k)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(par2IInventory, k + j * 9, 8 + k * 18, 18 + j * 18));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < 3; ++j)
|
||||
{
|
||||
for (k = 0; k < 9; ++k)
|
||||
for (j = 0; j < 3; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(par1IInventory, k + j * 9 + 9, 8 + k * 18, 103 + j * 18 + i));
|
||||
for (k = 0; k < 9; ++k)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(par1IInventory, k + j * 9 + 9, 8 + k * 18, 103 + j * 18 + i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(par1IInventory, j, 8 + j * 18, 161 + i));
|
||||
for (j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(par1IInventory, j, 8 + j * 18, 161 + i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,4 +106,4 @@ public class ContainerCrate extends Container
|
||||
{
|
||||
return this.lowerChestInventory;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -288,9 +288,11 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
|
||||
if (this.worldObj instanceof WorldServer)
|
||||
{
|
||||
NpcEvent.SwingEvent event = new NpcEvent.SwingEvent(wrappedNPC, stack);
|
||||
if(EventHooks.onNPCMeleeSwing(this, event))
|
||||
return;
|
||||
if(!isRemote()){
|
||||
NpcEvent.SwingEvent event = new NpcEvent.SwingEvent(wrappedNPC, stack);
|
||||
if(EventHooks.onNPCMeleeSwing(this, event))
|
||||
return;
|
||||
}
|
||||
|
||||
((WorldServer)this.worldObj).getEntityTracker().func_151247_a(this, new S0BPacketAnimation(this, 0));
|
||||
}
|
||||
|
||||
@@ -1319,7 +1319,8 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
return;
|
||||
this.npc.display.url = url;
|
||||
npc.textureLocation = null;
|
||||
npc.display.skinType = 2;
|
||||
if(npc.display.skinType < 2)
|
||||
npc.display.skinType = 2;
|
||||
npc.script.clientNeedsUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user