Fix identity annihilation plane.

Added annihilation plane blacklist tags.
Moved to using loot-table item generation for annihilation plane.
Play fluid pickup sound rather than block break sound for fluid annihilation planes.
Do not play a second block break sound (the server already does).
This commit is contained in:
Sebastian Hartte
2020-06-19 21:51:24 +02:00
parent 0a9e53d78c
commit 2458f9c890
12 changed files with 457 additions and 196 deletions
@@ -0,0 +1,80 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.client.render.effects;
import java.util.Locale;
import com.mojang.brigadier.StringReader;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import net.minecraft.network.PacketBuffer;
import net.minecraft.particles.IParticleData;
import net.minecraft.particles.ParticleType;
import appeng.api.util.AEPartLocation;
public class EnergyParticleData implements IParticleData {
public static final EnergyParticleData FOR_BLOCK = new EnergyParticleData(false, AEPartLocation.INTERNAL);
public final boolean forItem;
public final AEPartLocation direction;
public EnergyParticleData(boolean forItem, AEPartLocation direction) {
this.forItem = forItem;
this.direction = direction;
}
public static final IDeserializer<EnergyParticleData> DESERIALIZER = new IDeserializer<EnergyParticleData>() {
@Override
public EnergyParticleData deserialize(ParticleType<EnergyParticleData> particleTypeIn, StringReader reader)
throws CommandSyntaxException {
reader.expect(' ');
boolean forItem = reader.readBoolean();
reader.expect(' ');
AEPartLocation direction = AEPartLocation.valueOf(reader.readString().toUpperCase());
return new EnergyParticleData(forItem, direction);
}
@Override
public EnergyParticleData read(ParticleType<EnergyParticleData> particleTypeIn, PacketBuffer buffer) {
boolean forItem = buffer.readBoolean();
AEPartLocation direction = AEPartLocation.values()[buffer.readByte()];
return new EnergyParticleData(forItem, direction);
}
};
@Override
public ParticleType<?> getType() {
return EnergyFx.TYPE;
}
@Override
public void write(PacketBuffer buffer) {
buffer.writeBoolean(forItem);
buffer.writeByte((byte) direction.ordinal());
}
@Override
public String getParameters() {
return String.format(Locale.ROOT, "%s %s", forItem ? "true" : "false", direction.name().toLowerCase());
}
}