mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-25 06:34:35 +00:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
958f306252 | ||
|
|
150cf1e42d | ||
|
|
2e2d7e2879 | ||
|
|
f13c2c0ddc | ||
|
|
37b8bf7eca | ||
|
|
1407b34861 | ||
|
|
90077cdea5 | ||
|
|
32d5e538fd | ||
|
|
3a6d40b550 | ||
|
|
dfe8f5e56d |
No files matched your search
@@ -1,5 +1,3 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Build and test
|
||||
|
||||
@@ -11,35 +9,5 @@ on:
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup the workspace
|
||||
run: ./gradlew setupCIWorkspace
|
||||
|
||||
- name: Build the mod
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Run server for 1.5 minutes
|
||||
run: |
|
||||
mkdir run
|
||||
echo "eula=true" > run/eula.txt
|
||||
timeout 90 ./gradlew runServer 2>&1 | tee -a server.log || true
|
||||
|
||||
- name: Test no errors reported during server run
|
||||
run: |
|
||||
chmod +x .github/scripts/test_no_error_reports
|
||||
.github/scripts/test_no_error_reports
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
|
||||
secrets: inherit
|
||||
@@ -1,51 +1,14 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Release tagged build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
tags: [ '*' ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set release version
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup the workspace
|
||||
run: ./gradlew setupCIWorkspace
|
||||
|
||||
- name: Build the mod
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Release under current tag
|
||||
uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
|
||||
prerelease: false
|
||||
title: "${{ env.RELEASE_VERSION }}"
|
||||
files: build/libs/*.jar
|
||||
|
||||
- name: Publish to Maven
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
release-tags:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
|
||||
secrets: inherit
|
||||
+1
-1
@@ -7,7 +7,7 @@ dependencies {
|
||||
compileOnly("org.projectlombok:lombok:1.18.24")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.24")
|
||||
|
||||
shadeCompile("com.github.GTNewHorizons:CTMLib:1.4.2:dev")
|
||||
shadeCompile("com.github.GTNewHorizons:CTMLib:1.4.4:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:waila:1.5.19:dev") {
|
||||
transitive = false
|
||||
|
||||
@@ -103,6 +103,7 @@ public class ContainerChisel extends Container {
|
||||
entity.inventory.setItemStack(null);
|
||||
|
||||
if (!this.mergeItemStack(itemstack1, InventoryChiselSelection.normalSlots + 1, InventoryChiselSelection.normalSlots + 1 + 36, false)) {
|
||||
entity.inventory.setItemStack(itemstack1);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,13 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import team.chisel.block.tileentity.TileEntityPresent;
|
||||
|
||||
public class ContainerPresent extends Container {
|
||||
|
||||
private IInventory lower;
|
||||
private int rows;
|
||||
|
||||
private boolean isContainerValid = true;
|
||||
public ContainerPresent(IInventory player, IInventory chest) {
|
||||
lower = chest;
|
||||
rows = chest.getSizeInventory() / 9;
|
||||
@@ -68,6 +69,19 @@ public class ContainerPresent extends Container {
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||
return true;
|
||||
return isContainerValid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
TileEntityPresent te = (TileEntityPresent)lower;
|
||||
if( te != null && te.hasWorldObj() && !te.getWorldObj().isRemote)
|
||||
{
|
||||
if (te.getWorldObj().getTileEntity(te.xCoord, te.yCoord, te.zCoord) != te)
|
||||
isContainerValid = false;
|
||||
}
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,7 +16,7 @@ item.chisel.chisel.desc.modes=拥有多种雕刻模式.
|
||||
|
||||
item.chisel.chisel_diamond.name=钻石凿子
|
||||
item.chisel.chisel_obsidian.name=黑曜石凿子
|
||||
item.chisel.chisel_netherstar.name=Nether Star Chisel
|
||||
item.chisel.chisel_netherstar.name=下界之星凿子
|
||||
item.chisel.chisel_netherstar.gtnh.name=基岩凿子
|
||||
|
||||
item.ballMoss.name=苔藓球
|
||||
@@ -1741,5 +1741,4 @@ container.chisel.mode=模式:
|
||||
container.chisel.mode.single=单个雕刻
|
||||
container.chisel.mode.panel=范围雕刻
|
||||
container.chisel.mode.column=竖向雕刻
|
||||
container.chisel.mode.row=横向雕刻
|
||||
|
||||
container.chisel.mode.row=横向雕刻
|
||||
Reference in new issue
Block a user