Update readme, Update to latest forge.
This commit is contained in:
parent
f5e8eb5c78
commit
973ae4b773
22
README.md
22
README.md
|
|
@ -1,10 +1,20 @@
|
||||||
ironchest
|
Iron Chests [](https://minecraft.curseforge.com/projects/iron-chests) [](https://minecraft.curseforge.com/projects/iron-chests)
|
||||||
=========
|
===========
|
||||||
|
|
||||||
Iron Chest minecraft mod
|
Iron Chests! A mod that adds new chests.
|
||||||
|
|
||||||
a GPL v3 licensed mod by cpw
|
Please note that the Shulker Boxes in 1.13 have been moved to their own mod:
|
||||||
|
Github: [Iron Shulker Boxes](https://github.com/progwml6/ironshulkerboxes)
|
||||||
|
CurseForge: [Iron Shulker Boxes](https://github.com/progwml6/ironshulkerboxes)
|
||||||
|
|
||||||
Currently Maintained by ProgWML6
|
For issues with the Shulker Boxes starting in 1.13, Please report them to [Iron Shulker Boxes](https://github.com/progwml6/ironshulkerboxes)
|
||||||
|
|
||||||
See http://files.minecraftforge.net/IronChests2/ for downloads
|
## Setting up a Workspace/Compiling from Source
|
||||||
|
Note: Git MUST be installed and in the system path to use our scripts.
|
||||||
|
* Setup: Run [gradle]in the repository root: `gradlew[.bat] [eclipse] OR import build.gradle into idea`
|
||||||
|
* Build: Run [gradle]in the repository root: `gradlew[.bat] build`
|
||||||
|
* If obscure Gradle issues are found try running `gradlew clean` and `gradlew cleanCache`
|
||||||
|
|
||||||
|
[](https://discord.gg/njGrvuh)
|
||||||
|
|
||||||
|
If you have queries about any license or the other restrictions, please drop by our IRC channel, #progsmods on irc.esper.net
|
||||||
|
|
|
||||||
57
build.gradle
57
build.gradle
|
|
@ -30,23 +30,38 @@ minecraft {
|
||||||
mappings channel: 'snapshot', version: mappings_version
|
mappings channel: 'snapshot', version: mappings_version
|
||||||
|
|
||||||
runs {
|
runs {
|
||||||
client = {
|
client {
|
||||||
// recommended logging data for a userdev environment
|
workingDirectory project.file('run')
|
||||||
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
||||||
// recommended logging level for the console
|
// Recommended logging data for a userdev environment
|
||||||
properties 'forge.logging.console.level': 'debug'
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
workingDirectory project.file('run').canonicalPath
|
|
||||||
|
// Recommended logging level for the console
|
||||||
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
|
mods {
|
||||||
|
ironchest {
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
}
|
}
|
||||||
server = {
|
}
|
||||||
// recommended logging data for a userdev environment
|
}
|
||||||
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
||||||
// recommended logging level for the console
|
server {
|
||||||
properties 'forge.logging.console.level': 'debug'
|
workingDirectory project.file('run')
|
||||||
workingDirectory project.file('run').canonicalPath
|
|
||||||
|
// Recommended logging data for a userdev environment
|
||||||
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
|
|
||||||
|
// Recommended logging level for the console
|
||||||
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
|
mods {
|
||||||
|
ironchest {
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
@ -77,7 +92,7 @@ processResources {
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
include 'META-INF/mods.toml'
|
include 'META-INF/mods.toml'
|
||||||
|
|
||||||
expand 'version': project.version, 'mcversion': minecraft_version
|
expand 'version': project.version, 'mcversion': minecraft_version, 'forge_version': forge_version_toml
|
||||||
}
|
}
|
||||||
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
|
|
@ -96,13 +111,15 @@ artifacts {
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes(["Specification-Title": "Iron Chests",
|
attributes([
|
||||||
"Specification-Vendor": "Progwml6",
|
"Specification-Title" : "Iron Chests",
|
||||||
"Specification-Version": "1", // We are version 1 of ourselves
|
"Specification-Vendor" : "Progwml6",
|
||||||
"Implementation-Title": project.name,
|
"Specification-Version" : "1", // We are version 1 of ourselves
|
||||||
"Implementation-Version": "${version}",
|
"Implementation-Title" : project.name,
|
||||||
"Implementation-Vendor" :"Progwml6",
|
"Implementation-Version" : "${version}",
|
||||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
|
"Implementation-Vendor" : "Progwml6",
|
||||||
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||||
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,8 @@ minecraft_version=1.13.2
|
||||||
minecraft_version_toml=13
|
minecraft_version_toml=13
|
||||||
|
|
||||||
# Forge Version Information
|
# Forge Version Information
|
||||||
forge_version=25.0.23
|
forge_version=25.0.34
|
||||||
forge_version_toml=25
|
forge_version_toml=25
|
||||||
forge_group=net.minecraftforge
|
|
||||||
|
|
||||||
# Mappings Information
|
# Mappings Information
|
||||||
mappings_version=20190215-1.13.1
|
mappings_version=20190215-1.13.1
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,7 @@ public class TileEntityIronChestItemRenderer extends TileEntityItemStackRenderer
|
||||||
|
|
||||||
private static final TileEntityDirtChest DIRT_CHEST = new TileEntityDirtChest();
|
private static final TileEntityDirtChest DIRT_CHEST = new TileEntityDirtChest();
|
||||||
|
|
||||||
private static final TileEntityIronChest[] CHESTS = { IRON_CHEST, GOLD_CHEST, DIAMOND_CHEST, COPPER_CHEST, SILVER_CHEST, CRYSTAL_CHEST, OBSIDIAN_CHEST,
|
private static final TileEntityIronChest[] CHESTS = { IRON_CHEST, GOLD_CHEST, DIAMOND_CHEST, COPPER_CHEST, SILVER_CHEST, CRYSTAL_CHEST, OBSIDIAN_CHEST, DIRT_CHEST };
|
||||||
DIRT_CHEST };
|
|
||||||
|
|
||||||
public static TileEntityIronChestItemRenderer instance = new TileEntityIronChestItemRenderer();
|
public static TileEntityIronChestItemRenderer instance = new TileEntityIronChestItemRenderer();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ public class TileEntityIronChestRenderer<T extends TileEntity & IChestLid> exten
|
||||||
GlStateManager.scalef(1.0F, -1.0F, -1.0F);
|
GlStateManager.scalef(1.0F, -1.0F, -1.0F);
|
||||||
|
|
||||||
float f = iBlockState.get(BlockChest.FACING).getHorizontalAngle();
|
float f = iBlockState.get(BlockChest.FACING).getHorizontalAngle();
|
||||||
|
|
||||||
if (Math.abs(f) > 1.0E-5D)
|
if (Math.abs(f) > 1.0E-5D)
|
||||||
{
|
{
|
||||||
GlStateManager.translatef(0.5F, 0.5F, 0.5F);
|
GlStateManager.translatef(0.5F, 0.5F, 0.5F);
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
package com.progwml6.ironchest.common.blocks;
|
package com.progwml6.ironchest.common.blocks;
|
||||||
|
|
||||||
import com.progwml6.ironchest.common.tileentity.TileEntityIronChest;
|
import com.progwml6.ironchest.common.tileentity.TileEntityIronChest;
|
||||||
import io.netty.buffer.Unpooled;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockHorizontal;
|
import net.minecraft.block.BlockHorizontal;
|
||||||
import net.minecraft.block.state.BlockFaceShape;
|
import net.minecraft.block.state.BlockFaceShape;
|
||||||
|
|
@ -27,7 +26,6 @@ import net.minecraft.inventory.InventoryHelper;
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.network.PacketBuffer;
|
|
||||||
import net.minecraft.pathfinding.PathType;
|
import net.minecraft.pathfinding.PathType;
|
||||||
import net.minecraft.state.DirectionProperty;
|
import net.minecraft.state.DirectionProperty;
|
||||||
import net.minecraft.state.StateContainer;
|
import net.minecraft.state.StateContainer;
|
||||||
|
|
@ -143,10 +141,8 @@ public abstract class BlockChest extends Block
|
||||||
if (player instanceof EntityPlayerMP && !(player instanceof FakePlayer))
|
if (player instanceof EntityPlayerMP && !(player instanceof FakePlayer))
|
||||||
{
|
{
|
||||||
EntityPlayerMP entityPlayerMP = (EntityPlayerMP) player;
|
EntityPlayerMP entityPlayerMP = (EntityPlayerMP) player;
|
||||||
PacketBuffer buffer = new PacketBuffer(Unpooled.buffer());
|
|
||||||
buffer.writeBlockPos(pos);
|
|
||||||
|
|
||||||
NetworkHooks.openGui(entityPlayerMP, ilockablecontainer, buffer);
|
NetworkHooks.openGui(entityPlayerMP, ilockablecontainer, buf -> buf.writeBlockPos(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
player.addStat(StatList.OPEN_CHEST);
|
player.addStat(StatList.OPEN_CHEST);
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,13 @@ import com.progwml6.ironchest.IronChest;
|
||||||
import com.progwml6.ironchest.common.network.packets.PacketTopStackSyncChest;
|
import com.progwml6.ironchest.common.network.packets.PacketTopStackSyncChest;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.ChunkPos;
|
||||||
|
import net.minecraft.world.WorldServer;
|
||||||
import net.minecraftforge.common.util.FakePlayer;
|
import net.minecraftforge.common.util.FakePlayer;
|
||||||
import net.minecraftforge.fml.network.NetworkDirection;
|
import net.minecraftforge.fml.network.NetworkDirection;
|
||||||
import net.minecraftforge.fml.network.NetworkRegistry;
|
import net.minecraftforge.fml.network.NetworkRegistry;
|
||||||
|
import net.minecraftforge.fml.network.PacketDistributor;
|
||||||
import net.minecraftforge.fml.network.simple.SimpleChannel;
|
import net.minecraftforge.fml.network.simple.SimpleChannel;
|
||||||
|
|
||||||
public final class PacketHandler
|
public final class PacketHandler
|
||||||
|
|
@ -33,15 +37,11 @@ public final class PacketHandler
|
||||||
{
|
{
|
||||||
int disc = 0;
|
int disc = 0;
|
||||||
|
|
||||||
HANDLER.registerMessage(disc++, PacketTopStackSyncChest.class, PacketTopStackSyncChest::encode, PacketTopStackSyncChest::decode,
|
HANDLER.registerMessage(disc++, PacketTopStackSyncChest.class, PacketTopStackSyncChest::encode, PacketTopStackSyncChest::decode, PacketTopStackSyncChest.Handler::handle);
|
||||||
PacketTopStackSyncChest.Handler::handle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendTo(Object msg, EntityPlayerMP player)
|
public static <MSG> void send(PacketDistributor.PacketTarget target, MSG message)
|
||||||
{
|
{
|
||||||
if (!(player instanceof FakePlayer))
|
HANDLER.send(target, message);
|
||||||
{
|
|
||||||
HANDLER.sendTo(msg, player.connection.netManager, NetworkDirection.PLAY_TO_CLIENT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,9 @@ import com.progwml6.ironchest.common.network.PacketHandler;
|
||||||
import com.progwml6.ironchest.common.network.packets.PacketTopStackSyncChest;
|
import com.progwml6.ironchest.common.network.packets.PacketTopStackSyncChest;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraftforge.fml.server.ServerLifecycleHooks;
|
import net.minecraftforge.fml.network.PacketDistributor;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
|
@ -220,20 +219,7 @@ public class TileEntityCrystalChest extends TileEntityIronChest
|
||||||
{
|
{
|
||||||
NonNullList<ItemStack> stacks = this.buildItemStackDataList();
|
NonNullList<ItemStack> stacks = this.buildItemStackDataList();
|
||||||
|
|
||||||
for (EntityPlayerMP player : ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayers())
|
PacketHandler.send(PacketDistributor.TRACKING_CHUNK.with(() -> this.getWorld().getChunk(this.getPos())), new PacketTopStackSyncChest(this.getWorld().getDimension().getType().getId(), this.getPos(), stacks));
|
||||||
{
|
|
||||||
if (player.dimension == world.getDimension().getType())
|
|
||||||
{
|
|
||||||
double d4 = getPos().getX() - player.posX;
|
|
||||||
double d5 = getPos().getY() - player.posY;
|
|
||||||
double d6 = getPos().getZ() - player.posZ;
|
|
||||||
|
|
||||||
if (d4 * d4 + d5 * d5 + d6 * d6 < 16384)
|
|
||||||
{
|
|
||||||
PacketHandler.sendTo(new PacketTopStackSyncChest(this.getWorld().getDimension().getType().getId(), this.getPos(), stacks), player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void receiveMessageFromServer(NonNullList<ItemStack> topStacks)
|
public void receiveMessageFromServer(NonNullList<ItemStack> topStacks)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
modLoader="javafml"
|
modLoader="javafml"
|
||||||
loaderVersion="[24,)"
|
loaderVersion="[24,)"
|
||||||
|
issueTrackerURL="https://github.com/progwml6/ironchest/issues"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId="ironchest"
|
modId="ironchest"
|
||||||
|
namespace="ironchest"
|
||||||
version="${version}"
|
version="${version}"
|
||||||
displayName="Iron Chests"
|
displayName="Iron Chests"
|
||||||
authors="cpw, alexbegt, progwml6"
|
authors="cpw, alexbegt, progwml6"
|
||||||
|
|
@ -11,12 +12,10 @@ loaderVersion="[24,)"
|
||||||
New chests with larger sizes, with in-place upgrade items.
|
New chests with larger sizes, with in-place upgrade items.
|
||||||
The feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest
|
The feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest
|
||||||
'''
|
'''
|
||||||
namespace="ironchest"
|
|
||||||
issueTrackerURL="https://github.com/progwml6/ironchest/issues"
|
|
||||||
displayURL="https://minecraft.curseforge.com/projects/iron-chests"
|
displayURL="https://minecraft.curseforge.com/projects/iron-chests"
|
||||||
[[dependencies.ironchest]]
|
[[dependencies.ironchest]]
|
||||||
modId="forge"
|
modId="forge"
|
||||||
mandatory=true
|
mandatory=true
|
||||||
versionRange="[24,)"
|
versionRange="[${forge_version},)"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"description": "ironchests resources",
|
"description": "Iron Chests Resources",
|
||||||
"pack_format": 4,
|
"pack_format": 4,
|
||||||
"_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods."
|
"_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods."
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue