More minor fixes, 370
This commit is contained in:
parent
d68c65641d
commit
a5b2adac78
8 changed files with 23 additions and 24 deletions
|
@ -97,9 +97,8 @@ public class TechReborn {
|
|||
// Sounds
|
||||
ModSounds.init();
|
||||
// Client only init, needs to be done before parts system
|
||||
proxy.init(event);
|
||||
proxy.init();
|
||||
// WorldGen
|
||||
worldGen.load();
|
||||
//GameRegistry.registerWorldGenerator(worldGen, 0);
|
||||
//GameRegistry.registerWorldGenerator(new OilLakeGenerator(), 0);
|
||||
// Register Gui Handler
|
||||
|
@ -111,7 +110,6 @@ public class TechReborn {
|
|||
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new MultiblockServerTickHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new TRTickHandler());
|
||||
MinecraftForge.EVENT_BUS.register(worldGen.retroGen);
|
||||
//Village stuff
|
||||
if (ConfigTechReborn.enableRubberTreePlantation) {
|
||||
VillagerRegistry.instance().registerVillageCreationHandler(new VillagePlantaionHandler());
|
||||
|
@ -131,7 +129,7 @@ public class TechReborn {
|
|||
|
||||
@SubscribeEvent
|
||||
public void postinit() {
|
||||
proxy.postInit(event);
|
||||
proxy.postInit();
|
||||
|
||||
ModRecipes.postInit();
|
||||
LOGGER.info(RecipeHandler.recipeList.size() + " recipes loaded");
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
package techreborn.itemblocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import techreborn.TechReborn;
|
||||
|
||||
|
@ -34,8 +35,6 @@ import techreborn.TechReborn;
|
|||
public class ItemBlockRubberSapling extends ItemBlock {
|
||||
|
||||
public ItemBlockRubberSapling(Block block) {
|
||||
super(block);
|
||||
setCreativeTab(TechReborn.TAB);
|
||||
setTranslationKey("techreborn.rubberSapling");
|
||||
super(block, new Item.Properties().group(TechReborn.ITEMGROUP));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,9 +70,9 @@ public class DynamicCell extends Item {
|
|||
//TODO: Property ItemUtils.isItemEquals tags equality handling?
|
||||
if (stack.hasTag()) {
|
||||
NBTTagCompound tag = stack.getTag();
|
||||
if (tag.getSize() != 1 || tag.hasKey("Fluid")) {
|
||||
if (tag.size() != 1 || tag.contains("Fluid")) {
|
||||
NBTTagCompound clearTag = new NBTTagCompound();
|
||||
clearTag.setTag("Fluid", tag.getCompoundTag("Fluid"));
|
||||
clearTag.put("Fluid", tag.getCompound("Fluid"));
|
||||
stack.setTag(clearTag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,8 +58,8 @@ public class ItemFrequencyTransmitter extends Item {
|
|||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public float call(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
|
||||
if (!stack.isEmpty() && stack.hasTag() && stack.getTag() != null && stack.getTag().hasKey("x")
|
||||
&& stack.getTag().hasKey("y") && stack.getTag().hasKey("z") && stack.getTag().hasKey("dim")) {
|
||||
if (!stack.isEmpty() && stack.hasTag() && stack.getTag() != null && stack.getTag().contains("x")
|
||||
&& stack.getTag().contains("y") && stack.getTag().contains("z") && stack.getTag().contains("dim")) {
|
||||
return 1.0F;
|
||||
}
|
||||
return 0.0F;
|
||||
|
|
|
@ -39,6 +39,7 @@ import net.minecraft.util.text.TextComponentString;
|
|||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.common.util.NonNullSupplier;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
|
@ -50,6 +51,7 @@ import techreborn.blocks.cable.BlockCable;
|
|||
import techreborn.init.TRContent;
|
||||
import techreborn.init.TRTileEntities;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -89,7 +91,7 @@ public class TileCable extends TileEntity
|
|||
@Override
|
||||
public <T> LazyOptional<T> getCapability(Capability<T> capability) {
|
||||
if (capability == CapabilityEnergy.ENERGY) {
|
||||
return CapabilityEnergy.ENERGY.cast(this);
|
||||
return LazyOptional.of(() -> (T)this);
|
||||
}
|
||||
return super.getCapability(capability);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.common.ForgeMod;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.tile.ItemHandlerProvider;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
|
@ -96,7 +96,7 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr
|
|||
updateState();
|
||||
burnItem = inventory.getStackInSlot(fuelSlot);
|
||||
if (inventory.getStackInSlot(fuelSlot).getCount() == 1) {
|
||||
if (inventory.getStackInSlot(fuelSlot).getItem() == Items.LAVA_BUCKET || inventory.getStackInSlot(fuelSlot).getItem() == ForgeModContainer.getInstance().universalBucket) {
|
||||
if (inventory.getStackInSlot(fuelSlot).getItem() == Items.LAVA_BUCKET || inventory.getStackInSlot(fuelSlot).getItem() == ForgeMod.getInstance().universalBucket) {
|
||||
inventory.setStackInSlot(fuelSlot, new ItemStack(Items.BUCKET));
|
||||
} else {
|
||||
inventory.setStackInSlot(fuelSlot, ItemStack.EMPTY);
|
||||
|
|
|
@ -25,20 +25,20 @@
|
|||
package techreborn.tiles.storage.idsu;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.storage.MapStorage;
|
||||
import net.minecraft.world.storage.WorldSavedDataStorage;
|
||||
import techreborn.TechReborn;
|
||||
|
||||
public class IDSUManager {
|
||||
public static IDataIDSU getData(World world) {
|
||||
WorldSavedDataStorage storage = world.getMapStorage();
|
||||
IDSUSaveManger instance = (IDSUSaveManger) storage.getOrLoadData(IDSUSaveManger.class, TechReborn.MOD_ID + "_IDSU");
|
||||
|
||||
if (instance == null) {
|
||||
instance = new IDSUSaveManger(TechReborn.MOD_ID + "_IDSU");
|
||||
storage.setData(TechReborn.MOD_ID + "_IDSU", instance);
|
||||
}
|
||||
return instance;
|
||||
WorldSavedDataStorage storage = world.getSavedDataStorage();
|
||||
throw new UnsupportedOperationException("needs rewriting anyway");
|
||||
// IDSUSaveManger instance = (IDSUSaveManger) storage.getOrLoadData(IDSUSaveManger.class, TechReborn.MOD_ID + "_IDSU");
|
||||
//
|
||||
// if (instance == null) {
|
||||
// instance = new IDSUSaveManger(TechReborn.MOD_ID + "_IDSU");
|
||||
// storage.setData(TechReborn.MOD_ID + "_IDSU", instance);
|
||||
// }
|
||||
// return instance;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class StackWIPHandler {
|
|||
private void addHead(String name) {
|
||||
ItemStack head = new ItemStack(Items.PLAYER_HEAD, 3);
|
||||
head.setTag(new NBTTagCompound());
|
||||
head.getTag().setTag("SkullOwner", new NBTTagString(name));
|
||||
head.getTag().put("SkullOwner", new NBTTagString(name));
|
||||
devHeads.add(head);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue