Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
CYCLOPSMC_ENABLEDGAMETESTSGLOBAL: true
with:
java: ${{ env.java_version }}
mc: 26.2
mc: 26.3
modloader: neoforge
test-file: './mc-server-test.json'
- name: 'Deploy to CurseForge'
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ config

# Ignore Minecraft runtime logs
/logs

# ClientDevBridge session state (golden images are intentionally kept)
.clientdevbridge/*
!.clientdevbridge/golden/
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'net.neoforged.moddev' version '2.0.141'
id 'net.neoforged.moddev' version '2.0.147'
id 'net.darkhax.curseforgegradle' version '1.1.28'
id 'com.github.kt3k.coveralls' version '2.12.0'
id 'com.diffplug.spotless' version '7.2.1'
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ group=org.cyclops.integratedscripting
java_version=25

# Common
minecraft_version=26.2
minecraft_version=26.3
mod_name=IntegratedScripting
mod_author=rubensworks (aka kroeser)
mod_id=integratedscripting
Expand All @@ -19,7 +19,7 @@ curseforge_project_id=889785
modrinth_project_id=uDJkuFRe

# NeoForge
neoforge_version=26.2.0.6-beta
neoforge_version=26.3.0.7-beta
neoforge_loader_version_range=[4,)
neoforge_update_json_url=https://raw.githubusercontent.com/CyclopsMC/Versions/master/neoforge_update/integrated-scripting.json

Expand All @@ -32,6 +32,6 @@ org.gradle.configureondemand=true

# Dependencies
graal_version=25.2.4
cyclopscore_version=1.30.0-1056
integrateddynamics_version=1.33.4-1858
commoncapabilities_version=2.11.8-360
cyclopscore_version=1.30.0-1159
integrateddynamics_version=1.33.4-2157
commoncapabilities_version=2.11.8-398
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package org.cyclops.integratedscripting.block;

import com.mojang.serialization.MapCodec;
import net.minecraft.core.Direction;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityTicker;
Expand All @@ -25,8 +23,6 @@
*/
public class BlockScriptingDrive extends BlockWithEntityGuiCabled {

public static final MapCodec<BlockScriptingDrive> CODEC = simpleCodec(BlockScriptingDrive::new);

public static final EnumProperty<Direction> FACING = BlockStateProperties.HORIZONTAL_FACING;

public BlockScriptingDrive(Properties properties) {
Expand All @@ -36,11 +32,6 @@ public BlockScriptingDrive(Properties properties) {
.setValue(FACING, Direction.NORTH));
}

@Override
protected MapCodec<? extends BaseEntityBlock> codec() {
return CODEC;
}

@Override
@Nullable
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState blockState, BlockEntityType<T> blockEntityType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,8 @@ public boolean keyPressed(KeyEvent event) {

@Override
public boolean charTyped(CharacterEvent event) {
if (super.charTyped(event)) {
this.setFocused(true);
return true;
} else if (event.isAllowedChatCharacter()) {
// Don't delegate to EditBox, as it would insert into its own unused value instead of ours
if (event.isAllowedChatCharacter()) {
this.textFieldHelper.insertText(event.codepointAsString());
this.clearDisplayCache();
this.setFocused(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.cyclops.integratedscripting.inventory.container.ContainerTerminalScripting;
import org.cyclops.integratedscripting.network.packet.TerminalScriptingDeleteScriptPacket;
import org.cyclops.integratedscripting.network.packet.TerminalScriptingModifiedScriptPacket;
import org.lwjgl.glfw.GLFW;
import com.mojang.blaze3d.platform.InputConstants;

import javax.annotation.Nullable;
import java.nio.file.Path;
Expand Down Expand Up @@ -506,13 +506,13 @@ public boolean mouseDragged(MouseButtonEvent mouse, double offsetX, double offse
@Override
public boolean keyPressed(KeyEvent event) {
// Make active dialog consume all input
if (event.key() != GLFW.GLFW_KEY_ESCAPE && pendingScriptRemovalDialog != null) {
if (event.key() != InputConstants.KEY_ESCAPE && pendingScriptRemovalDialog != null) {
return false;
}

if (textArea.isFocused()) {
boolean ret = textArea.keyPressed(event);
if (event.key() != GLFW.GLFW_KEY_ESCAPE) {
if (event.key() != InputConstants.KEY_ESCAPE) {
return ret;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.util.Prediction;
import net.minecraft.util.StringUtil;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
Expand Down Expand Up @@ -132,7 +133,7 @@ public void removed(Player player) {
if (!player.level().isClientSide()) {
ItemStack itemStack = getContainerInventory().getItem(0);
if(!itemStack.isEmpty()) {
player.drop(itemStack, false);
player.drop(itemStack, false, Prediction.SERVER_ONLY);
}
}
}
Expand Down Expand Up @@ -392,11 +393,11 @@ public IntList getAvailableDisks() {
}

public void writeToPacketBuffer(FriendlyByteBuf packetBuffer) {
packetBuffer.writeIntIdList(getAvailableDisks());
packetBuffer.writeVarIntArray(getAvailableDisks().toIntArray());
}

public static InitData readFromPacketBuffer(FriendlyByteBuf packetBuffer) {
return new InitData(packetBuffer.readIntIdList());
return new InitData(IntList.of(packetBuffer.readVarIntArray()));
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ loaderVersion="${neoforge_loader_version_range}"
issueTrackerURL="${issue_tracker_url}"
displayURL="${display_url}"
license="${license}"
logoFile="logo.png"
iconFile="logo.png"
authors="${mod_author}"
[[mods]]
modId="${mod_id}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:copy_name",
"source": "block_entity"
}
],
"modifier": {
"type": "minecraft:copy_name",
"source": "block_entity"
},
"name": "integratedscripting:scripting_drive"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
"condition": {
"type": "minecraft:survives_explosion"
}
}
]
}
}
Loading