Update readme, Update to latest forge.

This commit is contained in:
alexbegt 2019-02-18 23:49:32 -05:00
parent f5e8eb5c78
commit 973ae4b773
12 changed files with 72 additions and 65 deletions

View File

@ -1,10 +1,20 @@
ironchest
=========
Iron Chests [![Curseforge](http://cf.way2muchnoise.eu/full_iron-chests_downloads.svg)](https://minecraft.curseforge.com/projects/iron-chests) [![Curseforge](http://cf.way2muchnoise.eu/versions/For%20MC_iron-chests_all.svg)](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`
[![Discord](https://img.shields.io/discord/102860784329052160.svg?style=for-the-badge)](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

View File

@ -30,23 +30,38 @@ minecraft {
mappings channel: 'snapshot', version: mappings_version
runs {
client = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run').canonicalPath
client {
workingDirectory project.file('run')
// 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
}
server = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run').canonicalPath
}
}
server {
workingDirectory project.file('run')
// 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
}
}
}
}
}
dependencies {
@ -77,7 +92,7 @@ processResources {
from(sourceSets.main.resources.srcDirs) {
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) {
@ -96,13 +111,15 @@ artifacts {
jar {
manifest {
attributes(["Specification-Title": "Iron Chests",
"Specification-Vendor": "Progwml6",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"Progwml6",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
attributes([
"Specification-Title" : "Iron Chests",
"Specification-Vendor" : "Progwml6",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "Progwml6",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

View File

@ -11,9 +11,8 @@ minecraft_version=1.13.2
minecraft_version_toml=13
# Forge Version Information
forge_version=25.0.23
forge_version=25.0.34
forge_version_toml=25
forge_group=net.minecraftforge
# Mappings Information
mappings_version=20190215-1.13.1

View File

@ -44,8 +44,7 @@ public class TileEntityIronChestItemRenderer extends TileEntityItemStackRenderer
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,
DIRT_CHEST };
private static final TileEntityIronChest[] CHESTS = { IRON_CHEST, GOLD_CHEST, DIAMOND_CHEST, COPPER_CHEST, SILVER_CHEST, CRYSTAL_CHEST, OBSIDIAN_CHEST, DIRT_CHEST };
public static TileEntityIronChestItemRenderer instance = new TileEntityIronChestItemRenderer();

View File

@ -102,6 +102,7 @@ public class TileEntityIronChestRenderer<T extends TileEntity & IChestLid> exten
GlStateManager.scalef(1.0F, -1.0F, -1.0F);
float f = iBlockState.get(BlockChest.FACING).getHorizontalAngle();
if (Math.abs(f) > 1.0E-5D)
{
GlStateManager.translatef(0.5F, 0.5F, 0.5F);

View File

@ -11,7 +11,6 @@
package com.progwml6.ironchest.common.blocks;
import com.progwml6.ironchest.common.tileentity.TileEntityIronChest;
import io.netty.buffer.Unpooled;
import net.minecraft.block.Block;
import net.minecraft.block.BlockHorizontal;
import net.minecraft.block.state.BlockFaceShape;
@ -27,7 +26,6 @@ import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer;
@ -143,10 +141,8 @@ public abstract class BlockChest extends Block
if (player instanceof EntityPlayerMP && !(player instanceof FakePlayer))
{
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);

View File

@ -14,9 +14,13 @@ import com.progwml6.ironchest.IronChest;
import com.progwml6.ironchest.common.network.packets.PacketTopStackSyncChest;
import net.minecraft.entity.player.EntityPlayerMP;
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.fml.network.NetworkDirection;
import net.minecraftforge.fml.network.NetworkRegistry;
import net.minecraftforge.fml.network.PacketDistributor;
import net.minecraftforge.fml.network.simple.SimpleChannel;
public final class PacketHandler
@ -33,15 +37,11 @@ public final class PacketHandler
{
int disc = 0;
HANDLER.registerMessage(disc++, PacketTopStackSyncChest.class, PacketTopStackSyncChest::encode, PacketTopStackSyncChest::decode,
PacketTopStackSyncChest.Handler::handle);
HANDLER.registerMessage(disc++, PacketTopStackSyncChest.class, PacketTopStackSyncChest::encode, PacketTopStackSyncChest::decode, 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.sendTo(msg, player.connection.netManager, NetworkDirection.PLAY_TO_CLIENT);
}
HANDLER.send(target, message);
}
}

View File

@ -17,10 +17,9 @@ import com.progwml6.ironchest.common.network.PacketHandler;
import com.progwml6.ironchest.common.network.packets.PacketTopStackSyncChest;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.server.ServerLifecycleHooks;
import net.minecraftforge.fml.network.PacketDistributor;
import java.util.Collections;
@ -220,20 +219,7 @@ public class TileEntityCrystalChest extends TileEntityIronChest
{
NonNullList<ItemStack> stacks = this.buildItemStackDataList();
for (EntityPlayerMP player : ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayers())
{
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);
}
}
}
PacketHandler.send(PacketDistributor.TRACKING_CHUNK.with(() -> this.getWorld().getChunk(this.getPos())), new PacketTopStackSyncChest(this.getWorld().getDimension().getType().getId(), this.getPos(), stacks));
}
public void receiveMessageFromServer(NonNullList<ItemStack> topStacks)

View File

@ -1,9 +1,10 @@
modLoader="javafml"
loaderVersion="[24,)"
issueTrackerURL="https://github.com/progwml6/ironchest/issues"
[[mods]]
modId="ironchest"
namespace="ironchest"
version="${version}"
displayName="Iron Chests"
authors="cpw, alexbegt, progwml6"
@ -11,12 +12,10 @@ loaderVersion="[24,)"
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
'''
namespace="ironchest"
issueTrackerURL="https://github.com/progwml6/ironchest/issues"
displayURL="https://minecraft.curseforge.com/projects/iron-chests"
[[dependencies.ironchest]]
modId="forge"
mandatory=true
versionRange="[24,)"
versionRange="[${forge_version},)"
ordering="NONE"
side="BOTH"

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"pack": {
"description": "ironchests resources",
"description": "Iron Chests Resources",
"pack_format": 4,
"_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods."
}

Binary file not shown.