Clean up, and realizing I don't have to send custom sound packets
This commit is contained in:
parent
0b8413ec67
commit
aa0b4219f6
4 changed files with 22 additions and 16 deletions
|
@ -40,32 +40,38 @@ public class ClientProxy extends CommonProxy {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerKeyBindingHandler() {
|
public void registerKeyBindingHandler() {
|
||||||
|
|
||||||
KeyBindingRegistry.registerKeyBinding(new KeyBindingHandler());
|
KeyBindingRegistry.registerKeyBinding(new KeyBindingHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerRenderTickHandler() {
|
public void registerRenderTickHandler() {
|
||||||
|
|
||||||
TickRegistry.registerTickHandler(new RenderTickHandler(), Side.CLIENT);
|
TickRegistry.registerTickHandler(new RenderTickHandler(), Side.CLIENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerDrawBlockHighlightHandler() {
|
public void registerDrawBlockHighlightHandler() {
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.register(new DrawBlockHighlightHandler());
|
MinecraftForge.EVENT_BUS.register(new DrawBlockHighlightHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setKeyBinding(String name, int value) {
|
public void setKeyBinding(String name, int value) {
|
||||||
|
|
||||||
KeyBindingHelper.addKeyBinding(name, value);
|
KeyBindingHelper.addKeyBinding(name, value);
|
||||||
KeyBindingHelper.addIsRepeating(false);
|
KeyBindingHelper.addIsRepeating(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerSoundHandler() {
|
public void registerSoundHandler() {
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.register(new SoundHandler());
|
MinecraftForge.EVENT_BUS.register(new SoundHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initCustomRarityTypes() {
|
public void initCustomRarityTypes() {
|
||||||
|
|
||||||
EnumHelperClient.addRarity(JUNK, COLOR_JUNK, DISPLAY_NAME_JUNK);
|
EnumHelperClient.addRarity(JUNK, COLOR_JUNK, DISPLAY_NAME_JUNK);
|
||||||
EnumHelperClient.addRarity(NORMAL, COLOR_NORMAL, DISPLAY_NAME_NORMAL);
|
EnumHelperClient.addRarity(NORMAL, COLOR_NORMAL, DISPLAY_NAME_NORMAL);
|
||||||
EnumHelperClient.addRarity(UNCOMMON, COLOR_UNCOMMON, DISPLAY_NAME_UNCOMMON);
|
EnumHelperClient.addRarity(UNCOMMON, COLOR_UNCOMMON, DISPLAY_NAME_UNCOMMON);
|
||||||
|
@ -77,6 +83,7 @@ public class ClientProxy extends CommonProxy {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumRarity getCustomRarityType(String customRarity) {
|
public EnumRarity getCustomRarityType(String customRarity) {
|
||||||
|
|
||||||
for (EnumRarity rarity : EnumRarity.class.getEnumConstants()) {
|
for (EnumRarity rarity : EnumRarity.class.getEnumConstants()) {
|
||||||
if (rarity.name().equals(customRarity))
|
if (rarity.name().equals(customRarity))
|
||||||
return rarity;
|
return rarity;
|
||||||
|
@ -86,6 +93,7 @@ public class ClientProxy extends CommonProxy {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initRenderingAndTextures() {
|
public void initRenderingAndTextures() {
|
||||||
|
|
||||||
RenderIds.calcinatorRenderId = RenderingRegistry.getNextAvailableRenderId();
|
RenderIds.calcinatorRenderId = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET);
|
MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET);
|
||||||
|
@ -99,9 +107,10 @@ public class ClientProxy extends CommonProxy {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initTileEntities() {
|
public void initTileEntities() {
|
||||||
|
|
||||||
super.initTileEntities();
|
super.initTileEntities();
|
||||||
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCalcinator.class, new RenderCalcinator());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileCalcinator.class, new RenderCalcinator());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ public class TransmutationHelper {
|
||||||
if (nextItem != null) {
|
if (nextItem != null) {
|
||||||
if (Block.blocksList[nextItem.itemID] != null) {
|
if (Block.blocksList[nextItem.itemID] != null) {
|
||||||
world.setBlockAndMetadataWithNotify(x, y, z, nextItem.itemID, nextItem.getItemDamage());
|
world.setBlockAndMetadataWithNotify(x, y, z, nextItem.itemID, nextItem.getItemDamage());
|
||||||
// TODO Send the sound event to everyone around the player, and not just play the sound on the current client
|
|
||||||
world.playSoundAtEntity(player, Sounds.TRANSMUTE, 0.5F, 1.0F);
|
world.playSoundAtEntity(player, Sounds.TRANSMUTE, 0.5F, 1.0F);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,6 @@ public class PacketKeyPressed extends PacketEE {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeData(DataOutputStream data) throws IOException {
|
public void writeData(DataOutputStream data) throws IOException {
|
||||||
data.writeUTF(key);
|
data.writeUTF(key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,6 @@ public class PacketTileUpdate extends PacketEE {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeData(DataOutputStream data) throws IOException {
|
public void writeData(DataOutputStream data) throws IOException {
|
||||||
data.writeInt(x);
|
data.writeInt(x);
|
||||||
data.writeInt(y);
|
data.writeInt(y);
|
||||||
|
|
Loading…
Reference in a new issue