Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/mc-1.19.x/stable' into mc-1.19…
Browse files Browse the repository at this point in the history
….x/polymer

# Conflicts:
#	gradle.properties
#	src/main/java/dan200/computercraft/client/ClientTableFormatter.java
#	src/main/java/dan200/computercraft/shared/Registry.java
#	src/main/resources/computercraft.mixins.json
#	src/main/resources/fabric.mod.json
#	src/main/resources/resourcepacks/classic/pack.mcmeta
  • Loading branch information
Patbox committed Jul 30, 2022
2 parents 3711ea1 + 55625c7 commit 5888c2e
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 60 deletions.
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Bug report
description: Report some misbehaviour in the mod
labels: [ bug ]
body:
- type: dropdown
id: mc-version
attributes:
label: Minecraft Version
description: What version of Minecraft are you using?
options:
- 1.18.x
- 1.19.x
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: "What version of CC: Restitched are you using?"
placeholder: "e.g. 1.100.1"
validations:
required: true
- type: textarea
id: details
attributes:
label: Details
description: |
Description of the bug. Please include the following:
- Logs: These will be located in the `logs/` directory of your Minecraft
instance. Please upload them as a gist or directly into this editor.
- Detailed reproduction steps: sometimes we can spot a bug pretty easily,
but often it's much more obscure. The more information we have to help
reproduce it, the quicker it'll get fixed.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Upload GitHub release
uses: AButler/[email protected]
with:
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and publish with Gradle
run: ./gradlew build publish
env:
#CURSEFORGE: ${{ secrets.CURSEFORGE }}
CURSEFORGE: ${{ secrets.CURSEFORGE }}
MODRINTH: ${{ secrets.MODRINTH }}
CHANGELOG: ${{ github.event.release.body }}

- name: Upload GitHub release
uses: AButler/[email protected]
with:
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ if (System.getenv("MODRINTH")) {
versionType = "release"
uploadFile = remapJar
gameVersions = [((String) project.mc_version)]
loaders = ["fabric"]
loaders = ["fabric", "quilt"]
changelog = System.getenv("CHANGELOG")
}

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
org.gradle.jvmargs=-Xmx3G

# Mod properties
mod_version=1.101.0
mod_version=1.101.2

# Minecraft properties
mc_version=1.19
fabric_api_version=0.56.0+1.19
fabric_loader_version=0.14.6
mc_version=1.19.1
fabric_api_version=0.58.5+1.19.1
fabric_loader_version=0.14.8

modmenu_version=4.0.0
modmenu_version=4.0.5
netty_http_version=4.1.77.Final

sub_version=1
13 changes: 7 additions & 6 deletions src/main/java/dan200/computercraft/api/turtle/FakePlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
import com.mojang.authlib.GameProfile;
import dan200.computercraft.shared.util.FakeNetHandler;
import net.minecraft.commands.arguments.EntityAnchorArgument;
import net.minecraft.network.chat.ChatSender;
import net.minecraft.network.chat.ChatType;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.PlayerChatMessage;
import net.minecraft.network.chat.*;
import net.minecraft.network.protocol.Packet;
import net.minecraft.resources.ResourceKey;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvent;
Expand Down Expand Up @@ -215,7 +211,12 @@ public void teleportTo( double x, double y, double z )


@Override
public void sendChatMessage( PlayerChatMessage playerChatMessage, ChatSender chatSender, ResourceKey<ChatType> resourceKey )
public void sendChatMessage( OutgoingPlayerChatMessage outgoingPlayerChatMessage, boolean bl, ChatType.Bound bound )
{
}

@Override
public void sendSystemMessage( Component component, boolean bl )
{
}

Expand Down
32 changes: 17 additions & 15 deletions src/main/java/dan200/computercraft/shared/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.item.*;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.BlockEntity;
Expand Down Expand Up @@ -91,15 +92,16 @@ public static void init() {

public static final class ModBlocks {
public static final BlockMonitor MONITOR_NORMAL =
register("monitor_normal", new BlockMonitor(monitorProperties(), () -> ModBlockEntities.MONITOR_NORMAL, Blocks.SMOOTH_STONE));
register("monitor_normal", new BlockMonitor(properties(), () -> ModBlockEntities.MONITOR_NORMAL, Blocks.SMOOTH_STONE));

public static final BlockMonitor MONITOR_ADVANCED =
register("monitor_advanced", new BlockMonitor(monitorProperties(), () -> ModBlockEntities.MONITOR_ADVANCED, Blocks.GOLD_BLOCK));
register("monitor_advanced", new BlockMonitor(properties(), () -> ModBlockEntities.MONITOR_ADVANCED, Blocks.GOLD_BLOCK));
public static final BlockComputer<TileComputer> COMPUTER_NORMAL =
register("computer_normal", new BlockComputer<>(properties(), ComputerFamily.NORMAL, () -> ModBlockEntities.COMPUTER_NORMAL));
register("computer_normal", new BlockComputer<>(computerProperties(), ComputerFamily.NORMAL, () -> ModBlockEntities.COMPUTER_NORMAL));
public static final BlockComputer<TileComputer> COMPUTER_ADVANCED =
register("computer_advanced", new BlockComputer<>(properties(), ComputerFamily.ADVANCED, () -> ModBlockEntities.COMPUTER_ADVANCED));
register("computer_advanced", new BlockComputer<>(computerProperties(), ComputerFamily.ADVANCED, () -> ModBlockEntities.COMPUTER_ADVANCED));
public static final BlockComputer<TileCommandComputer> COMPUTER_COMMAND =
register("computer_command", new BlockComputer<>(properties().strength(-1, 6000000.0F), ComputerFamily.COMMAND, () -> ModBlockEntities.COMPUTER_COMMAND));
register("computer_command", new BlockComputer<>(computerProperties().strength(-1, 6000000.0F), ComputerFamily.COMMAND, () -> ModBlockEntities.COMPUTER_COMMAND));
public static final BlockTurtle TURTLE_NORMAL =
register("turtle_normal", new BlockTurtle(turtleProperties(), ComputerFamily.NORMAL, () -> ModBlockEntities.TURTLE_NORMAL));
public static final BlockTurtle TURTLE_ADVANCED =
Expand All @@ -119,20 +121,20 @@ public static final class ModBlocks {
public static final BlockCable CABLE =
register("cable", new BlockCable(modemProperties()));

public static <T extends Block> T register(String id, T value) {
return net.minecraft.core.Registry.register(net.minecraft.core.Registry.BLOCK, new ResourceLocation(MOD_ID, id), value);
}

private static BlockBehaviour.Properties properties() {
return BlockBehaviour.Properties.of(Material.STONE).strength(2F).noOcclusion();
private static BlockBehaviour.Properties properties()
{
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2F );
}

private static BlockBehaviour.Properties monitorProperties() {
return BlockBehaviour.Properties.of(Material.STONE).strength(2F);
private static BlockBehaviour.Properties computerProperties()
{
return properties().noOcclusion()
.isRedstoneConductor( ( BlockState state, BlockGetter getter, BlockPos pos ) -> false );
}

private static BlockBehaviour.Properties turtleProperties() {
return BlockBehaviour.Properties.of(Material.STONE).strength(2.5f);
private static BlockBehaviour.Properties turtleProperties()
{
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2.5f );
}

private static BlockBehaviour.Properties modemProperties() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private Object[] doCommand( String command )
try
{
receiver.clearOutput();
int result = commandManager.performCommand( computer.getSource(), command );
int result = commandManager.performPrefixedCommand( computer.getSource(), command );
return new Object[] { result > 0, receiver.copyOutput(), result };
}
catch( Throwable t )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
import dan200.computercraft.fabric.mixin.ConnectionAccess;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GenericFutureListener;
import net.minecraft.network.Connection;
import net.minecraft.network.ConnectionProtocol;
import net.minecraft.network.PacketListener;
import net.minecraft.network.PacketSendListener;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.PacketFlow;
Expand Down Expand Up @@ -183,7 +182,7 @@ public void send( @Nonnull Packet<?> packet )
}

@Override
public void send( @Nonnull Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> whenSent )
public void send( Packet<?> packet, @org.jetbrains.annotations.Nullable PacketSendListener packetSendListener )
{
}

Expand Down Expand Up @@ -325,7 +324,7 @@ public void send( @Nonnull Packet<?> packet )
}

@Override
public void send( @Nonnull Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> whenSent )
public void send( Packet<?> packet, @org.jetbrains.annotations.Nullable PacketSendListener packetSendListener )
{
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"Jummit",
"Toad-Dev",
"3prm3",
"Patbox (Polymer Port)"
"Patbox"
],
"depends": {
"minecraft": ">=1.19 <1.20",
"fabricloader": ">=0.14.6",
"fabric": ">=0.51.1"
"minecraft": ">=1.19.1 <1.20",
"fabricloader": ">=0.14.8",
"fabric": ">=0.58.4"
},
"suggests": {
"modmenu": "*"
Expand Down

0 comments on commit 5888c2e

Please sign in to comment.