fixes
This commit is contained in:
parent
936154e5ce
commit
d404c1743a
16 changed files with 331 additions and 892 deletions
|
@ -649,6 +649,7 @@ public class Client implements IThreadListener {
|
|||
|
||||
public void refreshResources()
|
||||
{
|
||||
this.logFeed("Lade Texturen neu");
|
||||
Font.unload();
|
||||
Font.load(this.font);
|
||||
this.textureManager.onReload();
|
||||
|
@ -659,6 +660,7 @@ public class Client implements IThreadListener {
|
|||
this.renderGlobal.onReload();
|
||||
EntityTexManager.loadNpcTextures();
|
||||
this.renderGlobal.loadRenderers();
|
||||
this.logFeed("Texturen wurden neu geladen");
|
||||
}
|
||||
|
||||
public void init()
|
||||
|
@ -1406,6 +1408,8 @@ public class Client implements IThreadListener {
|
|||
{
|
||||
this.player.swingItem();
|
||||
this.player.client.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.PRIMARY.ordinal()));
|
||||
if(this.player.getHeldItem() != null && this.player.getHeldItem().isEmpty())
|
||||
this.player.inventory.mainInventory[this.player.inventory.currentItem] = null;
|
||||
this.leftClickCounter = 10;
|
||||
return;
|
||||
}
|
||||
|
@ -1458,6 +1462,8 @@ public class Client implements IThreadListener {
|
|||
{
|
||||
this.player.swingItem();
|
||||
this.player.client.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.SECONDARY.ordinal()));
|
||||
if(this.player.getHeldItem() != null && this.player.getHeldItem().isEmpty())
|
||||
this.player.inventory.mainInventory[this.player.inventory.currentItem] = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1524,6 +1530,8 @@ public class Client implements IThreadListener {
|
|||
{
|
||||
if(this.player.getHeldItem() != null && this.player.getHeldItem().getItem().onAction(this.player.getHeldItem(), this.player, this.world, ItemControl.TERTIARY, null)) {
|
||||
this.player.client.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.TERTIARY.ordinal()));
|
||||
if(this.player.getHeldItem() != null && this.player.getHeldItem().isEmpty())
|
||||
this.player.inventory.mainInventory[this.player.inventory.currentItem] = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1576,6 +1584,8 @@ public class Client implements IThreadListener {
|
|||
{
|
||||
if(this.player.getHeldItem() != null && this.player.getHeldItem().getItem().onAction(this.player.getHeldItem(), this.player, this.world, ItemControl.QUARTERNARY, null)) {
|
||||
this.player.client.addToSendQueue(new CPacketAction(Action.ITEM_ACTION, ItemControl.QUARTERNARY.ordinal()));
|
||||
if(this.player.getHeldItem() != null && this.player.getHeldItem().isEmpty())
|
||||
this.player.inventory.mainInventory[this.player.inventory.currentItem] = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1700,6 +1710,11 @@ public class Client implements IThreadListener {
|
|||
if(this.player != null)
|
||||
this.player.client.addToSendQueue(new CPacketAction(action));
|
||||
}
|
||||
|
||||
public void performAction(Action action, int data) {
|
||||
if(this.player != null)
|
||||
this.player.client.addToSendQueue(new CPacketAction(action, data));
|
||||
}
|
||||
|
||||
public void setBossStatus(EntityLiving entity) {
|
||||
if(this.bars.size() < 5 || this.bars.containsKey(entity.getId()))
|
||||
|
@ -2542,12 +2557,12 @@ public class Client implements IThreadListener {
|
|||
}
|
||||
|
||||
public void restartSound(boolean load) {
|
||||
Client.this.logFeed("Lade Sound-System neu");
|
||||
Client.this.logFeed("Lade Sound-System " + (load ? "und alle Sounds " : "") + "neu");
|
||||
this.soundManager.unload();
|
||||
if(audio.end())
|
||||
Log.SOUND.info("Audiogerät geschlossen");
|
||||
this.startSound(load);
|
||||
Client.this.logFeed("Das Sound-System wurde neu geladen");
|
||||
Client.this.logFeed("Das Sound-System " + (load ? "und alle Sounds wurden" : "wurde") + " neu geladen");
|
||||
}
|
||||
|
||||
public AudioInterface getAudioInterface() {
|
||||
|
@ -2592,9 +2607,9 @@ public class Client implements IThreadListener {
|
|||
Client.this.performAction(Action.SPEED);
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.R, "Gegenstand reparieren und Stapel auffüllen", new DebugRunner() {
|
||||
this.registerDebug(Keysym.R, "Gegenstand in Hand / Alle (+Shift) reparieren und auffüllen", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.performAction(Action.REPAIR);
|
||||
Client.this.performAction(Action.REPAIR, Client.this.shift() ? 1 : 0);
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.E, "Gegenstands-Cheat-Menü umschalten", new DebugRunner() {
|
||||
|
@ -2662,16 +2677,12 @@ public class Client implements IThreadListener {
|
|||
});
|
||||
this.registerDebug(Keysym.T, "Alle Texturen neu laden", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Lade Texturen neu");
|
||||
Client.this.refreshResources();
|
||||
Client.this.logFeed("Texturen wurden neu geladen");
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.S, "Alle Sounds neu laden", new DebugRunner() {
|
||||
this.registerDebug(Keysym.S, "Sound neu starten / Alle Sounds neu laden (+Shift)", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Lade Sounds neu");
|
||||
Client.this.restartSound(true);
|
||||
Client.this.logFeed("Sounds wurden neu geladen");
|
||||
Client.this.restartSound(Client.this.shift());
|
||||
}
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
|
|
|
@ -956,7 +956,7 @@ public class EffectRenderer {
|
|||
this.register(ParticleType.CRIT, (x, y, z, xSpeed, ySpeed, zSpeed, data) -> new Crit(x, y, z, xSpeed, ySpeed, zSpeed));
|
||||
this.register(ParticleType.SMOKE, (x, y, z, xSpeed, ySpeed, zSpeed, data) -> new Smoke(x, y, z, xSpeed, ySpeed, zSpeed));
|
||||
this.register(ParticleType.POTION, (x, y, z, xSpeed, ySpeed, zSpeed, data) -> new Spell(x, y, z, xSpeed, ySpeed, zSpeed,
|
||||
(data & 16383) != 0 ? ItemPotion.getPotionItem(data).getColorFromDamage() : 0xffffffff));
|
||||
ItemPotion.getPotionItem(data).getColorFromDamage()));
|
||||
this.register(ParticleType.GROW, (x, y, z, xSpeed, ySpeed, zSpeed, data) -> new Aura(x, y, z, xSpeed, ySpeed, zSpeed, false, 1));
|
||||
this.register(ParticleType.SPORE, (x, y, z, xSpeed, ySpeed, zSpeed, data) -> new Aura(x, y, z, xSpeed, ySpeed, zSpeed, false, 0));
|
||||
this.register(ParticleType.TELEPORT, (x, y, z, xSpeed, ySpeed, zSpeed, data) -> new Teleport(x, y, z, xSpeed, ySpeed, zSpeed));
|
||||
|
@ -1068,16 +1068,13 @@ public class EffectRenderer {
|
|||
this.layers[i].add(effect);
|
||||
}
|
||||
|
||||
public Effect spawnParticle(ParticleType type, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, int data) {
|
||||
public void spawnParticle(ParticleType type, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, int data) {
|
||||
Creator creator = this.types.get(type);
|
||||
if(creator != null) {
|
||||
Effect effect = creator.create(x, y, z, xSpeed, ySpeed, zSpeed, data);
|
||||
if(effect != null) {
|
||||
if(effect != null)
|
||||
this.add(effect);
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void destroyBlock(BlockPos pos, State state) {
|
||||
|
|
|
@ -3,7 +3,6 @@ package client.renderer.entity;
|
|||
import common.entity.projectile.EntityPotion;
|
||||
import common.init.Items;
|
||||
import common.item.ItemStack;
|
||||
import common.item.tool.ItemPotion;
|
||||
|
||||
public class RenderPotion extends RenderItemEntity<EntityPotion>
|
||||
{
|
||||
|
@ -14,6 +13,6 @@ public class RenderPotion extends RenderItemEntity<EntityPotion>
|
|||
|
||||
public ItemStack getStack(EntityPotion entityIn)
|
||||
{
|
||||
return new ItemStack(ItemPotion.getPotionItem(entityIn.getPotionDamage()));
|
||||
return new ItemStack(entityIn.getPotionDamage());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,8 @@ public class PlayerController {
|
|||
if(stack != null && stack.getItem().onAction(stack, this.gm.player, this.gm.world, ItemControl.PRIMARY, pos)) {
|
||||
this.interacting = true;
|
||||
this.handler.addToSendQueue(new CPacketBreak(CPacketBreak.Action.START_DESTROY_BLOCK, pos, face));
|
||||
if(this.gm.player.getHeldItem() != null && this.gm.player.getHeldItem().isEmpty())
|
||||
this.gm.player.inventory.mainInventory[this.gm.player.inventory.currentItem] = null;
|
||||
return true;
|
||||
}
|
||||
if(!this.hitting || !this.isHitting(pos)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue