mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-25 14:34:36 +00:00
Fixed The Spectator making particles for every player, not just the client player.
This commit is contained in:
1 parent
814089897f
commit
f0ec6c9e6b
3 files changed
+12
No files matched your search
@@ -153,6 +153,11 @@ public class ClientProxy extends CommonProxy {
|
||||
GuiLexicon.currentOpenLexicon = new GuiLexiconEntry(entry, new GuiLexiconIndex(entry.category));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTheClientPlayer(EntityLivingBase entity) {
|
||||
return entity == Minecraft.getMinecraft().thePlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExtraReach(EntityLivingBase entity, float reach) {
|
||||
super.setExtraReach(entity, reach);
|
||||
|
||||
@@ -96,6 +96,10 @@ public class CommonProxy {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
public boolean isTheClientPlayer(EntityLivingBase entity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setExtraReach(EntityLivingBase entity, float reach) {
|
||||
if(entity instanceof EntityPlayerMP)
|
||||
((EntityPlayerMP) entity).theItemInWorldManager.setBlockReachDistance(5.0 + reach);
|
||||
|
||||
@@ -60,6 +60,9 @@ public class ItemItemFinder extends ItemBauble {
|
||||
}
|
||||
|
||||
public void tickClient(ItemStack stack, EntityPlayer player) {
|
||||
if(!Botania.proxy.isTheClientPlayer(player))
|
||||
return;
|
||||
|
||||
String pos = ItemNBTHelper.getString(stack, TAG_POSITIONS, "");
|
||||
String[] tokens = pos.split(";");
|
||||
for(String token : tokens) {
|
||||
|
||||
Reference in new issue
Block a user