Skip to content

Commit 32cad35

Browse files
committed
1.21.4
1 parent 1c0e8e1 commit 32cad35

44 files changed

Lines changed: 229 additions & 179 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ dependencies {
3636
// Fabric API. This is technically optional, but you probably want it anyway.
3737
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
3838

39-
modImplementation("cc.tweaked:cc-tweaked-${project.minecraft_version}-fabric-api:1.117.1")
40-
modImplementation("cc.tweaked:cc-tweaked-${project.minecraft_version}-fabric:1.117.1")
39+
modImplementation("cc.tweaked:cc-tweaked-${project.minecraft_version}-fabric-api:1.115.1")
40+
modImplementation("cc.tweaked:cc-tweaked-${project.minecraft_version}-fabric:1.115.1")
4141
}
4242

4343
processResources {

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ org.gradle.parallel=true
44

55
# Fabric Properties
66
# check these on https://fabricmc.net/develop
7-
minecraft_version=1.21.1
8-
yarn_mappings=1.21.1+build.3
9-
loader_version=0.17.3
7+
minecraft_version=1.21.4
8+
yarn_mappings=1.21.4+build.8
9+
loader_version=0.18.6
1010
loom_version=1.15-SNAPSHOT
1111

1212
# Mod Properties
@@ -15,5 +15,5 @@ maven_group=com.redtoast
1515
archives_base_name=Neet-Computers
1616

1717
# Dependencies
18-
fabric_version=0.116.10+1.21.1
18+
fabric_version=0.119.4+1.21.4
1919
luaj=3.0.2

src/main/java/com/redtoast/Connections/CableRenderer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
import java.util.Hashtable;
2323

24+
import static net.minecraft.client.texture.SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE;
25+
2426
@Environment(EnvType.CLIENT)
2527
public class CableRenderer {
2628

@@ -74,7 +76,7 @@ public static void drawPipeBlock(
7476
public static void renderPipe(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Identifier texture, Hashtable<Direction, Boolean> neighborMap) {
7577
RenderLayer layer = RenderLayer.getCutout();
7678
VertexConsumer vc = vertexConsumers.getBuffer(layer);
77-
Sprite sprite = MinecraftClient.getInstance().getSpriteAtlas(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE).apply(texture);
79+
Sprite sprite = MinecraftClient.getInstance().getSpriteAtlas(BLOCK_ATLAS_TEXTURE).apply(texture);
7880

7981
MatrixStack.Entry entry = matrices.peek();
8082
Matrix4f positionMatrix = entry.getPositionMatrix();

src/main/java/com/redtoast/blocks/DesktopComputer/DesktopBlockComputer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.redtoast.blocks.Generics.ComputerBlock;
44
import com.redtoast.neet.BulkRegistry;
5+
import com.redtoast.neet.NeetComputersServer;
56
import net.minecraft.block.BlockRenderType;
67
import net.minecraft.block.BlockState;
78
import net.minecraft.block.ShapeContext;
@@ -19,7 +20,7 @@ public DesktopBlockComputer(Settings settings) {
1920

2021
@Override
2122
public BlockEntityType<? extends BlockEntity> getType() {
22-
return BulkRegistry.fetchBlockEntityType("desktop_computer");
23+
return NeetComputersServer.desktopComputerType;
2324
}
2425

2526
@Override

src/main/java/com/redtoast/blocks/DesktopComputer/DesktopComputerRenderer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
import com.redtoast.blocks.Generics.ComputerRenderer;
44
import com.redtoast.graphics.RotationTools;
5+
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
56
import org.joml.Matrix3f;
67
import org.joml.Vector3f;
78

89
public class DesktopComputerRenderer extends ComputerRenderer<DesktopEntityComputer> {
910

11+
public DesktopComputerRenderer(BlockEntityRendererFactory.Context ctx) {
12+
super(ctx);
13+
}
14+
1015
@Override
1116
public Vector3f getOffset(DesktopEntityComputer i) {
1217
return new Vector3f(2.5f / 16f, 5.0206f / 16f, 1 - 3.1481f / 16f);

src/main/java/com/redtoast/blocks/DesktopComputer/DesktopEntityComputer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
import com.redtoast.blocks.Generics.ComputerBlockEntity;
44
import com.redtoast.neet.BulkRegistry;
5+
import com.redtoast.neet.NeetComputersServer;
56
import com.redtoast.simulation.config.DefaultComputerConfig;
67
import net.minecraft.block.BlockState;
78
import net.minecraft.util.math.BlockPos;
89

910
public class DesktopEntityComputer extends ComputerBlockEntity{
1011
public DesktopEntityComputer(BlockPos pos, BlockState state) {
11-
super(BulkRegistry.fetchBlockEntityType("desktop_computer"), pos, state, new DefaultComputerConfig("Desktop Computer", 11, 6));
12+
super(NeetComputersServer.desktopComputerType, pos, state, new DefaultComputerConfig("Desktop Computer", 11, 6));
1213
}
1314
}

src/main/java/com/redtoast/blocks/DynamicLight/DynamicLightBlock.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.redtoast.Connections.PeripheralBlock;
44
import com.redtoast.neet.BulkRegistry;
5+
import com.redtoast.neet.NeetComputersServer;
56
import net.minecraft.block.Block;
67
import net.minecraft.block.BlockEntityProvider;
78
import net.minecraft.block.BlockState;
@@ -25,7 +26,7 @@ public DynamicLightBlock(Settings settings) {
2526

2627
@Override
2728
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) {
28-
return type == BulkRegistry.fetchBlockEntityType("dynamic_light") ? DynamicLightBlockEntity::tick : null;
29+
return type == NeetComputersServer.dynamicLightType ? DynamicLightBlockEntity::tick : null;
2930
}
3031

3132
@Nullable

src/main/java/com/redtoast/blocks/DynamicLight/DynamicLightBlockEntity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.redtoast.Connections.PipeRenderSource;
55
import com.redtoast.Connections.PipeType;
66
import com.redtoast.neet.BulkRegistry;
7+
import com.redtoast.neet.NeetComputersServer;
78
import com.redtoast.simulation.Runtime;
89
import com.redtoast.simulation.parameter.ParameterCheckReturn;
910
import com.redtoast.simulation.parameter.ParameterRules;
@@ -31,7 +32,7 @@ public class DynamicLightBlockEntity extends BlockEntity implements PeripheralPr
3132
private Integer lightLevelCurrent = 0;
3233

3334
public DynamicLightBlockEntity(BlockPos pos, BlockState state) {
34-
super(BulkRegistry.fetchBlockEntityType("dynamic_light"), pos, state);
35+
super(NeetComputersServer.dynamicLightType, pos, state);
3536
}
3637

3738
@Override

src/main/java/com/redtoast/blocks/Generics/ComputerBlock.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import net.minecraft.item.ItemPlacementContext;
1313
import net.minecraft.item.ItemStack;
1414
import net.minecraft.screen.NamedScreenHandlerFactory;
15+
import net.minecraft.server.world.ServerWorld;
1516
import net.minecraft.state.StateManager;
1617
import net.minecraft.state.property.BooleanProperty;
1718
import net.minecraft.state.property.IntProperty;
@@ -89,7 +90,7 @@ public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEnt
8990
}
9091

9192
@Override
92-
public void onDestroyedByExplosion(World world, BlockPos pos, Explosion explosion) {
93+
public void onDestroyedByExplosion(ServerWorld world, BlockPos pos, Explosion explosion) {
9394
super.onDestroyedByExplosion(world, pos, explosion);
9495
if (!world.isClient()) {
9596
BlockEntity be = world.getBlockEntity(pos);

src/main/java/com/redtoast/blocks/Generics/ComputerBlockEntity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLooku
143143

144144
public ActionResult onUse(PlayerEntity player, BlockState state){
145145
if (corrupted) {
146-
player.sendMessage(Text.literal("NBT DATA CORRUPTED, the files are still being stored server-side"));
146+
player.sendMessage(Text.of("NBT DATA CORRUPTED, the files are still being stored server-side"),false);
147147
return ActionResult.SUCCESS;
148148
}
149149
if (!player.isSneaking() && !player.isUsingItem() && computer.isOn()){
@@ -159,7 +159,7 @@ public ActionResult onUse(PlayerEntity player, BlockState state){
159159
computer.stop();
160160
}
161161
}else{
162-
if (computer.isCrashed()) player.sendMessage(Text.literal(computer.getCrashMessage()));
162+
if (computer.isCrashed()) player.sendMessage(Text.of(computer.getCrashMessage()),false);
163163
computer.start();
164164
}
165165
return ActionResult.SUCCESS;

0 commit comments

Comments
 (0)