Skip to content

Commit

Permalink
Update to CC:Tweaked 1.113
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Aug 23, 2024
1 parent b8d5c4b commit ab5d180
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 34 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation "cc.tweaked:cc-tweaked-1.21-fabric:1.112.0"
modImplementation "cc.tweaked:cc-tweaked-1.21.1-fabric:1.113.0"

modImplementation include('eu.pb4:sgui:1.6.0+1.21')
modImplementation include('eu.pb4:player-data-api:0.6.0+1.21')
modImplementation include('eu.pb4:map-canvas-api:0.4.1+1.21')
modImplementation include('eu.pb4:factorytools:0.3.2+1.21')
modImplementation 'eu.pb4:polymer-core:0.9.9+1.21'
modImplementation 'eu.pb4:polymer-resource-pack:0.9.9+1.21'
modImplementation 'eu.pb4:polymer-autohost:0.9.9+1.21'
modImplementation 'eu.pb4:polymer-virtual-entity:0.9.9+1.21'
modImplementation 'eu.pb4:polymer-core:0.9.11+1.21.1'
modImplementation 'eu.pb4:polymer-resource-pack:0.9.11+1.21.1'
modImplementation 'eu.pb4:polymer-autohost:0.9.11+1.21.1'
modImplementation 'eu.pb4:polymer-virtual-entity:0.9.11+1.21.1'


modCompileOnly ("nl.theepicblock:PolyMc:5.6.1+1.20.4") {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21
yarn_mappings=1.21+build.1
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.1
loader_version=0.15.11

# Mod Properties
mod_version=1.112.0.1+1.21
mod_version=1.113.0.0+1.21
maven_group=eu.pb4.cctpatch
archives_base_name=cc-tweaked-polymer-patch

Expand Down
12 changes: 0 additions & 12 deletions src/main/java/eu/pb4/cctpatch/mixin/PocketBrainAccessor.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package eu.pb4.cctpatch.mixin.mod.block;

import dan200.computercraft.shared.lectern.CustomLecternBlock;
import eu.pb4.polymer.core.api.block.PolymerBlock;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import org.spongepowered.asm.mixin.Mixin;

@Mixin(CustomLecternBlock.class)
public class CustomLecternBlockMixin implements PolymerBlock {
@Override
public BlockState getPolymerBlockState(BlockState state) {
return Blocks.LECTERN.getStateWithProperties(state);
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
package eu.pb4.cctpatch.mixin.mod.item;

import dan200.computercraft.api.pocket.IPocketUpgrade;
import dan200.computercraft.shared.pocket.core.PocketBrain;
import dan200.computercraft.shared.pocket.core.PocketHolder;
import dan200.computercraft.shared.pocket.core.PocketServerComputer;
import eu.pb4.cctpatch.impl.poly.PocketComputerRenderer;
import eu.pb4.cctpatch.impl.poly.ext.ServerComputerExt;
import eu.pb4.cctpatch.mixin.PocketBrainAccessor;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand All @@ -26,11 +20,11 @@ public abstract class PocketServerComputerMixin implements ServerComputerExt {

@Inject(method = "onRemoved", at = @At(value = "INVOKE", target = "Ldan200/computercraft/shared/computer/core/ServerComputer;onRemoved()V"))
private void onRemovedCall(CallbackInfo ci) {
this.renderer.onRemoved(((PocketBrainAccessor) (Object) this.brain).callHolder() instanceof PocketHolder.EntityHolder ent ? ent.entity() : null);
this.renderer.onRemoved(this.brain.getEntity());
}
@Inject(method = "tickServer", at = @At("HEAD"))
private void onTick(CallbackInfo ci) {
this.renderer.tick(((PocketBrainAccessor) (Object) this.brain).callHolder() instanceof PocketHolder.EntityHolder ent ? ent.entity() : null);
this.renderer.tick(this.brain.getEntity());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.llamalad7.mixinextras.sugar.Local;
import dan200.computercraft.shared.ModRegistry;
import dan200.computercraft.shared.common.HeldItemMenu;
import dan200.computercraft.shared.computer.inventory.AbstractComputerMenu;
import dan200.computercraft.shared.media.PrintoutMenu;
import dan200.computercraft.shared.media.items.PrintoutItem;
import dan200.computercraft.shared.peripheral.diskdrive.DiskDriveMenu;
import dan200.computercraft.shared.peripheral.printer.PrinterMenu;
Expand Down Expand Up @@ -31,8 +31,8 @@ private void openCustomScreen(NamedScreenHandlerFactory factory, CallbackInfoRet
} else if (handler instanceof PrinterMenu wrapped) {
new PrinterInventoryGui((ServerPlayerEntity) (Object) this, wrapped);
cir.setReturnValue(OptionalInt.empty());
} else if (handler instanceof HeldItemMenu menu && menu.getStack().getItem() instanceof PrintoutItem) {
new PrintedPageGui((ServerPlayerEntity) (Object) this, menu.getStack());
} else if (handler instanceof PrintoutMenu menu && menu.getPrintout().getItem() instanceof PrintoutItem) {
new PrintedPageGui((ServerPlayerEntity) (Object) this, menu.getPrintout());
cir.setReturnValue(OptionalInt.empty());
} else if (handler instanceof DiskDriveMenu menu) {
new DiskDriveInventoryGui((ServerPlayerEntity) (Object) this, menu);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/cc-tweaked-polymer-patch.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"package": "eu.pb4.cctpatch.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [
"PocketBrainAccessor",
"ServerPlayNetworkHandlerAccessor",
"TurtleModemAccessor",
"mod.ComputerCraftMixin",
"mod.PlatformHelperImplRegistryEntryImplMixin",
"mod.ServerNetworkingMixin",
"mod.block.CustomLecternBlockMixin",
"mod.block.GenericBlockModelMixin",
"mod.block.ModRegistryBlocksMixin",
"mod.block.MonitorBlockEntityMixin",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"cc-tweaked-polymer-patch.mixins.json"
],
"depends": {
"fabricloader": ">=0.15.0",
"computercraft": ">=1.101.0",
"fabricloader": ">=0.15.10",
"computercraft": ">=1.113.0",
"minecraft": ">=1.21-",
"java": ">=21",
"fabric-api": "*"
Expand Down

0 comments on commit ab5d180

Please sign in to comment.