Skip to content

Commit

Permalink
v1.0.2 Update
Browse files Browse the repository at this point in the history
Fixed crash
  • Loading branch information
tom5454 committed Apr 27, 2020
1 parent 21e674c commit d9445d2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.0.0'
version = '1.0.2'
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'toms_storage'

Expand Down
33 changes: 4 additions & 29 deletions src/main/java/com/tom/storagemod/StorageMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

Expand Down Expand Up @@ -57,47 +58,21 @@ public StorageMod() {
// Register the processIMC method for modloading
//FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
// Register the doClientStuff method for modloading
//FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

// Register ourselves for server and other game events we are interested in
MinecraftForge.EVENT_BUS.register(this);
}

private void setup(final FMLCommonSetupEvent event)
{
// some preinit code
private void setup(final FMLCommonSetupEvent event) {
LOGGER.info("Tom's Storage Setup starting");
proxy.setup();
}

/*private void doClientStuff(final FMLClientSetupEvent event) {
// do something that can only be done on the client
//LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings);
private void doClientStuff(final FMLClientSetupEvent event) {
proxy.clientSetup();
}
private void enqueueIMC(final InterModEnqueueEvent event)
{
// some example code to dispatch IMC to another mod
//InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
}

private void processIMC(final InterModProcessEvent event)
{
// some example code to receive and process InterModComms from other mods
LOGGER.info("Got IMC {}", event.getIMCStream().
map(m->m.getMessageSupplier().get()).
collect(Collectors.toList()));
}*/
// You can use SubscribeEvent and let the Event Bus discover methods to call

/*@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {
// do something when the server starts
//LOGGER.info("HELLO from server starting");
}*/

// You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
// Event bus for receiving Registry Events)
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public void tick() {
if(!checkedBlocks.contains(p) && p.distanceSq(pos) < 256) {
checkedBlocks.add(p);
TileEntity te = world.getTileEntity(p);
if(te != null) {
if (te instanceof TileEntityInventoryConnector) {
continue;
} else if(te != null) {
LazyOptional<IItemHandler> inv = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, d.getOpposite());
if(te instanceof ChestTileEntity) {//Check for double chests
BlockState state = world.getBlockState(p);
Expand Down
5 changes: 3 additions & 2 deletions version-check.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/toms-storage",
"promos": {
"1.15.2-latest": "1.0.1",
"1.15.2-recommended": "1.0.1"
"1.15.2-latest": "1.0.2",
"1.15.2-recommended": "1.0.2"
},
"1.15.2": {
"1.0.2": "Fixed crash",
"1.0.1": "Fixed loot tables",
"1.0.0": "First release"
}
Expand Down

0 comments on commit d9445d2

Please sign in to comment.