Moving
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ public enum ButtonToolTips {
|
||||
|
||||
@Deprecated
|
||||
public String getLocal() {
|
||||
return getTranslationKey().getFormattedText();
|
||||
return getTranslationKey().getString();
|
||||
}
|
||||
|
||||
public Text getTranslationKey() {
|
||||
+1
-2
@@ -18,7 +18,6 @@
|
||||
|
||||
package appeng.core.localization;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
|
||||
@@ -44,7 +43,7 @@ public enum WailaText {
|
||||
}
|
||||
|
||||
public String getLocal() {
|
||||
return I18n.format(this.getTranslationKey());
|
||||
return textComponent().getString();
|
||||
}
|
||||
|
||||
public String getTranslationKey() {
|
||||
+1
-1
@@ -21,7 +21,7 @@ package appeng.decorative;
|
||||
import appeng.block.AEBaseBlock;
|
||||
|
||||
public class AEDecorativeBlock extends AEBaseBlock {
|
||||
public AEDecorativeBlock(Properties props) {
|
||||
public AEDecorativeBlock(Settings props) {
|
||||
super(props);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -32,7 +32,7 @@ import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
|
||||
public class ChargedQuartzOreBlock extends QuartzOreBlock {
|
||||
public ChargedQuartzOreBlock(Properties props) {
|
||||
public ChargedQuartzOreBlock(Settings props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import appeng.helpers.AEGlassMaterial;
|
||||
|
||||
public class QuartzGlassBlock extends AbstractGlassBlock {
|
||||
|
||||
public QuartzGlassBlock(Properties props) {
|
||||
public QuartzGlassBlock(Settings props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import appeng.core.AppEng;
|
||||
|
||||
public class QuartzLampBlock extends QuartzGlassBlock {
|
||||
|
||||
public QuartzLampBlock(Properties props) {
|
||||
public QuartzLampBlock(Settings props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
+14
-6
@@ -18,21 +18,29 @@
|
||||
|
||||
package appeng.decorative.solid;
|
||||
|
||||
import appeng.block.AEBaseBlock;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import appeng.block.AEBaseBlock;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class QuartzOreBlock extends AEBaseBlock {
|
||||
public QuartzOreBlock(Properties props) {
|
||||
public QuartzOreBlock(Settings props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getExpDrop(BlockState state, net.minecraft.world.WorldView reader, BlockPos pos, int fortune,
|
||||
int silktouch) {
|
||||
return silktouch == 0 ? MathHelper.nextInt(RANDOM, 2, 5) : 0;
|
||||
public void onStacksDropped(BlockState state, World world, BlockPos pos, ItemStack stack) {
|
||||
super.onStacksDropped(state, world, pos, stack);
|
||||
if (EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, stack) == 0) {
|
||||
int i = MathHelper.nextInt(world.random, 2, 5);
|
||||
if (i > 0) {
|
||||
this.dropExperience(world, pos, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -20,7 +20,7 @@ package appeng.decorative.solid;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.state.EnumProperty;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.util.math.Direction;
|
||||
@@ -35,7 +35,7 @@ import appeng.helpers.MetaRotation;
|
||||
public class QuartzPillarBlock extends AEDecorativeBlock implements IOrientableBlock {
|
||||
public static final EnumProperty<Direction.Axis> AXIS = Properties.AXIS;
|
||||
|
||||
public QuartzPillarBlock(Properties props) {
|
||||
public QuartzPillarBlock(Settings props) {
|
||||
super(props);
|
||||
|
||||
// The upwards facing pillar is the default (i.e. for the item model)
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class SkyStoneBlock extends AEBaseBlock {
|
||||
private static final double BREAK_SPEAK_THRESHOLD = 7.0;
|
||||
private final SkystoneType type;
|
||||
|
||||
public SkyStoneBlock(SkystoneType type, Properties props) {
|
||||
public SkyStoneBlock(SkystoneType type, Settings props) {
|
||||
super(props);
|
||||
this.type = type;
|
||||
|
||||
@@ -21,10 +21,10 @@ package appeng.block.networking;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.state.EnumProperty;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.StringIdentifiable;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -34,11 +34,11 @@ import appeng.tile.networking.ControllerBlockEntity;
|
||||
|
||||
public class ControllerBlock extends AEBaseTileBlock<ControllerBlockEntity> {
|
||||
|
||||
public enum ControllerBlockState implements IStringSerializable {
|
||||
public enum ControllerBlockState implements StringIdentifiable {
|
||||
offline, online, conflicted;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String asString() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@ public class ControllerBlock extends AEBaseTileBlock<ControllerBlockEntity> {
|
||||
* enclosed by other controllers, and since they are always offline, they do not
|
||||
* have the usual sub-states.
|
||||
*/
|
||||
public enum ControllerRenderType implements IStringSerializable {
|
||||
public enum ControllerRenderType implements StringIdentifiable {
|
||||
block, column_x, column_y, column_z, inside_a, inside_b;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String asString() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ package appeng.block.networking;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.state.EnumProperty;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.StringIdentifiable;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
@@ -46,11 +46,11 @@ import appeng.util.Platform;
|
||||
|
||||
public class WirelessBlock extends AEBaseTileBlock<WirelessBlockEntity> {
|
||||
|
||||
enum State implements IStringSerializable {
|
||||
enum State implements StringIdentifiable {
|
||||
OFF, ON, HAS_CHANNEL;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String asString() {
|
||||
return this.name().toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.state.EnumProperty;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
package appeng.block.storage;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.StringIdentifiable;
|
||||
|
||||
/**
|
||||
* Describes the type of cell present in a slot.
|
||||
*/
|
||||
public enum DriveSlotCellType implements IStringSerializable {
|
||||
public enum DriveSlotCellType implements StringIdentifiable {
|
||||
|
||||
EMPTY("empty"),
|
||||
|
||||
@@ -38,7 +38,7 @@ public enum DriveSlotCellType implements IStringSerializable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String asString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package appeng.block.storage;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.StringIdentifiable;
|
||||
|
||||
import appeng.api.storage.cells.CellState;
|
||||
|
||||
@@ -26,7 +26,7 @@ import appeng.api.storage.cells.CellState;
|
||||
* Describes the different states a single slot of a BlockDrive can be in in
|
||||
* terms of rendering.
|
||||
*/
|
||||
public enum DriveSlotState implements IStringSerializable {
|
||||
public enum DriveSlotState implements StringIdentifiable {
|
||||
|
||||
// No cell in slot
|
||||
EMPTY("empty"),
|
||||
@@ -50,7 +50,7 @@ public enum DriveSlotState implements IStringSerializable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String asString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,14 +24,14 @@ import net.minecraft.client.renderer.Matrix4f;
|
||||
import net.minecraft.client.renderer.Quaternion;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.client.renderer.Vector4f;
|
||||
import net.minecraft.util.StringIdentifiable;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
|
||||
/**
|
||||
* TODO: Removed useless stuff.
|
||||
*/
|
||||
public enum FacingToRotation implements IStringSerializable {
|
||||
public enum FacingToRotation implements StringIdentifiable {
|
||||
|
||||
// DUNSWE
|
||||
// @formatter:off
|
||||
@@ -110,7 +110,7 @@ public enum FacingToRotation implements IStringSerializable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public String asString() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user