Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/main/java/cam72cam/mod/block/BlockType.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ public boolean canBeConnectedTo(IBlockAccess internal, BlockPos pos, EnumFacing
return BlockType.this.isConnectable();
}

@Deprecated
@Override
public BlockFaceShape getBlockFaceShape(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) {
if (BlockType.this.isConnectable()) {
return super.getBlockFaceShape(p_193383_1_, p_193383_2_, p_193383_3_, p_193383_4_);
}
return BlockFaceShape.UNDEFINED;
}

public boolean tryBreak(net.minecraft.world.World world, BlockPos pos, EntityPlayer player) {
return BlockType.this.tryBreak(World.get(world), new Vec3i(pos), new Player(player));
}
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/cam72cam/mod/entity/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ public boolean isCreative() {
return internal.isCreative();
}

@Deprecated
public float getYawHead() {
return internal.rotationYawHead;
}

public void setHeldItem(Hand hand, ItemStack stack) {
internal.setHeldItem(hand.internal, stack.internal);
}
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/cam72cam/mod/gui/container/IContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
* @see cam72cam.mod.gui.GuiRegistry for more details
*/
public interface IContainer {
@Deprecated
default void draw(IContainerBuilder builder) { }

/** Called once server side to layout the GUI and every tick client side to actually draw the screen + slots */
default void draw(IContainerBuilder builder, RenderState state) {
draw(builder);
}
void draw(IContainerBuilder builder, RenderState state);

/** Width of this container in slots */
int getSlotsX();
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/cam72cam/mod/gui/screen/Button.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ public class Button implements IWidget{
/** Default width/height */
public Button(IScreenBuilder builder, int x, int y, String text, BiConsumer<Player.Hand, Button> handler) {
this(builder, x, y, 200, 20, text, handler);
}

@Deprecated
public Button(IScreenBuilder builder, int x, int y, String text) {
this(builder, x, y, 200, 20, text, (hand, button1) -> {});
}

/** Custom width/height */
Expand All @@ -37,13 +32,6 @@ public Button(IScreenBuilder builder, int x, int y, int width, int height, Strin
handler);
}

@Deprecated
public Button(IScreenBuilder builder, int x, int y, int width, int height, String text) {
this(builder,
new GuiButton(-1, builder.getWidth() / 2 + x, builder.getHeight() / 4 + y, width, height, text),
(hand, button1) -> {});
}

/** Internal ctr */
protected Button(IScreenBuilder builder, GuiButton button, BiConsumer<Player.Hand, Button> handler) {
this.button = button;
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/cam72cam/mod/gui/screen/CheckBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ public CheckBox(IScreenBuilder builder, int x, int y, String text, boolean enabl
((hand, button1) -> handler.accept(hand, (CheckBox) button1)));
}

@Deprecated
public CheckBox(IScreenBuilder builder, int x, int y, String text, boolean enabled) {
super(builder,
new GuiCheckBox(-1, builder.getWidth() / 2 + x, builder.getHeight() / 4 + y, text, enabled),
((hand, button1) -> {}));
}


public boolean isChecked() {
return ((GuiCheckBox) this.button).isChecked();
}
Expand Down
14 changes: 2 additions & 12 deletions src/main/java/cam72cam/mod/gui/screen/IScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ public interface IScreen {
/** Called when screen is initially constructed */
void init(IScreenBuilder screen);

@Deprecated
default void onEnterKey(IScreenBuilder builder) { }
/** Called when any key is pressed outside textfield */
default void onKeyType(IScreenBuilder builder, Keyboard.KeyCode keyCode){
if (keyCode == Keyboard.KeyCode.NUMPADENTER || keyCode == Keyboard.KeyCode.RETURN) {
onEnterKey(builder);
}
}
void onKeyType(IScreenBuilder builder, Keyboard.KeyCode keyCode);

/**
* Called when player click his mouse outside textfield
Expand All @@ -28,10 +22,6 @@ default void onMouseClick(int x, int y, Player.Hand hand){
/** Called during close */
void onClose();

@Deprecated
default void draw(IScreenBuilder builder) { }
/** Called once per screen draw */
default void draw(IScreenBuilder builder, RenderState state) {
draw(builder);
}
void draw(IScreenBuilder builder, RenderState state);
}
10 changes: 0 additions & 10 deletions src/main/java/cam72cam/mod/gui/screen/Slider.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ public Slider(IScreenBuilder builder, int x, int y, int width, int height, Strin
((GuiSlider) this.button).parent = slider -> Slider.this.onSlider();
}


@Deprecated
public Slider(IScreenBuilder builder, int x, int y, String text, double min, double max, double start, boolean doublePrecision) {
super(builder,
new GuiSlider(-1, builder.getWidth() / 2 + x, builder.getHeight() / 4 + y, text, min, max, start, null),
((hand, button1) -> {}));
((GuiSlider) this.button).showDecimal = doublePrecision;
((GuiSlider) this.button).parent = slider -> Slider.this.onSlider();
}

/** Called when the slider value is changed */
public void onSlider() {
this.handler.accept(Player.Hand.PRIMARY, this);
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/cam72cam/mod/gui/screen/TextField.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ public void setVisible(boolean visible) {
textfield.setEnabled(visible);
}

@Deprecated
public void setVisible(Boolean visible) {
this.setVisible(visible.booleanValue());
}

@Override
public boolean isVisible() {
return textfield.getVisible();
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/cam72cam/mod/item/ItemStack.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public ItemStack(CustomItem item, int i) {
this(new net.minecraft.item.ItemStack(item.internal, i));
}

@Deprecated
public ItemStack(String item, int i, int meta) {
this(new net.minecraft.item.ItemStack(Item.getByNameOrId(item), i, meta));
}

/** Tag attached to this stack */
public TagCompound getTagCompound() {
if (internal.getTagCompound() == null) {
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/cam72cam/mod/item/ItemStackHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,6 @@ public int getLimit(int slot) {
return internal.getSlotLimit(slot);
}

@Deprecated
public TagCompound save() {
return new TagCompound(internal.serializeNBT());
}

@Deprecated
public void load(TagCompound items) {
internal.deserializeNBT(items.internal);
}

public static class TagMapper implements cam72cam.mod.serialization.TagMapper<ItemStackHandler> {
@Override
public TagAccessor<ItemStackHandler> apply(Class<ItemStackHandler> type, String fieldName, TagField tag) throws SerializationException {
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/cam72cam/mod/world/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,6 @@ public <T extends net.minecraft.tileentity.TileEntity> T getTileEntity(Vec3i pos
return null;
}

/** Get all block entities of the given type */
public <T extends BlockEntity> List<T> getBlockEntities(Class<T> cls) {
return internal.loadedTileEntityList.stream()
.filter(x -> x instanceof TileEntity && ((TileEntity) x).isLoaded() && cls.isInstance(((TileEntity) x).instance()))
.map(x -> (T) ((TileEntity) x).instance())
.collect(Collectors.toList());
}

/** Get a block entity at the position, assuming type */
public <T extends BlockEntity> T getBlockEntity(Vec3i pos, Class<T> cls) {
TileEntity te = getTileEntity(pos, TileEntity.class);
Expand Down