• Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1.7 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • I'm trying to host a server on Aternos. I've contacted them about this, and they could not help, and said this is an issue with Forge.   So I can start the server, and it'll run. However, when me or my friend try to join, we get this error message in our game, "Server is still starting! Please wait before reconnecting.". I've been trying to do everything I can to try and get around this, but to no avail. The server has only crashed twice out of over 20 times, and even then, I get to errors in the server's log; https://mclo.gs/2GecAzo I have the correct version of forge, since I would have had an error if forge was in the wrong version, and all the mods have no conflicts at least on the client side, and we have all the cores for all the mods; https://pastebin.com/SjScpkvT It's a 1.7.10 version of Forge, since my friend is wanting to try mods out for his first time, and I'm unable to host a server myself since our internet provider has us locked out of our internet settings, so I cannot port it myself. I've tried using the custom IP for the server and the DynIP that is created new each time the server goes online, but neither works. I've even tried to spam join the server by clicking join, and when I get the error, cancel and go back to multiplayer, and try to join again. What I've looked up online about this too and nothing about unable to join, it's more of the server is not starting, and I even tried putting the error message in quotes, and still nothing. I've also deleted everything and redownloaded as well, but nothing.   If there's no solution to this, then I'm not sure what to do. We really wanted to play a simple modded Minecraft, but it's been 3 days of constant trying by now. If I can't get any help on here, I might just see if my internet provider will let me port, otherwise I'm stumped on what to do. No other third parties let you host modded servers decently, or if at all, and I don't want to give up if I have options still.   Also, I just made an account to this site, so if this is in the wrong place, sorry.
    • I cannot understand what i am doing wrong. It seems like forge never register TE: I tried to use an item to know if its TE has been registered. It says that it hasn't any TE   Block: package com.olivemod.blocks.machine.energy_cell.copper; import com.olivemod.utils.ModTileEntityTypes; import com.olivemod.utils.Reference.NBTKeys; import com.olivemod.utils.Reference.Reference; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.ContainerBlock; import net.minecraft.block.RedstoneTorchBlock; import net.minecraft.block.material.Material; import net.minecraft.entity.LivingEntity; import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.ItemStack; import net.minecraft.state.BooleanProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraftforge.common.ToolType; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; public class CopperCell extends Block{ private static BooleanProperty energyIn = BooleanProperty.create("lit"); public CopperCell() { super(Properties.create(Material.IRON).hardnessAndResistance(5.0f).harvestTool(ToolType.PICKAXE)); this.setDefaultState(this.getDefaultState().with(energyIn, Boolean.valueOf(false))); } @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState().with(energyIn, Boolean.valueOf(false)); } @Override public boolean hasTileEntity() { return true; } @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return ModTileEntityTypes.COPPER_CELL_TE.get().create(); } @Override protected void fillStateContainer(Builder<Block, BlockState> builder) { builder.add(energyIn); } } TE: package com.olivemod.blocks.machine.energy_cell.copper; import javax.annotation.Nonnull; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.core.Logger; import com.olivemod.blocks.transfer.energy.CableType; import com.olivemod.energy.SeattableEnergyStorage.SettableEnergyStorage; import com.olivemod.utils.ModTileEntityTypes; import com.olivemod.utils.ModUtils; import com.olivemod.utils.Reference.NBTKeys; import com.sun.istack.internal.Nullable; import net.minecraft.client.renderer.texture.ITickable; import net.minecraft.nbt.CompoundNBT; import net.minecraft.network.NetworkManager; import net.minecraft.network.play.server.SUpdateTileEntityPacket; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; public class CopperEnergyCellTE extends TileEntity implements ITickable{ private static final int capacity = 2500; private static final int maxTransfer = 100; public final SettableEnergyStorage storage = new SettableEnergyStorage(capacity, maxTransfer); private final LazyOptional<IEnergyStorage> energyLazyOptional = LazyOptional.of( () -> this.storage); private int lastEnergy = -1; public CopperEnergyCellTE() { super(ModTileEntityTypes.COPPER_CELL_TE.get()); } public CopperEnergyCellTE(TileEntityType<?> tileEntityTypeIn) { super(tileEntityTypeIn); } @Override public void tick() { transferEnergy(capacity, maxTransfer); } private void transferEnergy(int capacity, int maxTransfer) { for (Direction direction : ModUtils.DIRECTIONS) { IEnergyStorage storage = world.getTileEntity(pos.offset(direction)).getCapability(CapabilityEnergy.ENERGY).orElse(null); if(storage != null && storage.getEnergyStored() < storage.getMaxEnergyStored() && storage.canReceive()) { storage.receiveEnergy(this.storage.extractEnergy(maxTransfer, false), false); } if(storage != null && storage.getEnergyStored() > 0 && storage.canExtract()) { this.storage.addEnergy(storage.extractEnergy(maxTransfer, false)); } //let vanilla update chunk this.markDirty(); //Notify client of a block update //This will result in the packet from getUpdatePacket beong sent to the client //Energy will be synced //Flag 2 send change to client world.notifyBlockUpdate(pos, this.getBlockState(), this.getBlockState(), 2); this.lastEnergy = storage.getEnergyStored(); } } @Override public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) { this.storage.setEnergy(pkt.getNbtCompound().getInt(NBTKeys.ENERGY.getKey())); } @Override public CompoundNBT write(CompoundNBT compound) { super.write(compound); compound.putInt(NBTKeys.ENERGY.getKey(), this.storage.getEnergyStored()); return compound; } @Override public void read(CompoundNBT compound) { super.read(compound); this.storage.setEnergy(compound.getInt(NBTKeys.ENERGY.getKey())); } @Override public <T> LazyOptional<T> getCapability(Capability<T> cap) { if(cap == CapabilityEnergy.ENERGY) { return this.energyLazyOptional.cast(); } return null; } @Override public void onLoad() { if(!world.isRemote && world != null) this.lastEnergy = getCapability(CapabilityEnergy.ENERGY).orElse(null).getEnergyStored(); } /* * Retrieves packet to send to the client whenever this Tile Entity is re-sinced via World#notifyBlockUpdate. * This packet comes back client-side via (@link #onDataPacket) */ @Nullable @Override public SUpdateTileEntityPacket getUpdatePacket() { final CompoundNBT tag = new CompoundNBT(); if(tag.contains(NBTKeys.ENERGY.getKey())) tag.putInt(NBTKeys.ENERGY.getKey(), this.storage.getEnergyStored()); //We pass 0 for TileEntityTypesIn because we have a modded TE.See ClientPlayNetHandler#handlerUpdateTileEntity(SUpdateTileEntityPacket) return new SUpdateTileEntityPacket(this.pos, 0, tag); } /* * Get an NBT compount to sync to the client with SPacketChunkData, used to initial loading of the chunk or when many blocks change at once * This compound comes back to the client-side in (@link #handleUpdateTag) * The default implementation ({@link TileEntity#handleUpdateTag}) calls {@link #writeInternal)} * wich doesn't save any of our extra data so we override it to call {@link #write} instead */ @Nonnull public CompoundNBT getUpdateTag() { return this.write(new CompoundNBT()); } } ModTileEntityTypes: package com.olivemod.utils; import javax.annotation.Nonnull; import com.olivemod.blocks.cable.energy.CopperCableTE; import com.olivemod.blocks.machine.energy.crusher.TileEntityCrusher; import com.olivemod.blocks.machine.energy.electric_furnace.TileEntityElectricFurnace; import com.olivemod.blocks.machine.energy.generator.glowstone_generator.TileEntityGlowStoneGenerator; import com.olivemod.blocks.machine.energy_cell.copper.CopperEnergyCellTE; import com.olivemod.blocks.transfer.energy.EnergyCableTileEntity; import com.olivemod.init.BlockInit; import com.olivemod.utils.Reference.Reference; import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public class ModTileEntityTypes { //HERE YOU REGISTER YOUR TEs public static final DeferredRegister<TileEntityType<?>> TILE_ENTITY_TYPE = new DeferredRegister<>(ForgeRegistries.TILE_ENTITIES, Reference.MOD_ID); public static final RegistryObject<TileEntityType<TileEntityGlowStoneGenerator>> GLOWSTONE_GENERATOR_TE = TILE_ENTITY_TYPE.register("glowstone_generator", () -> TileEntityType.Builder.create(TileEntityGlowStoneGenerator::new, BlockInit.GLOWSTONE_GENERATOR.get()).build(null)); public static final RegistryObject<TileEntityType<TileEntityElectricFurnace>> ELECTRIC_FURNACE_TE = TILE_ENTITY_TYPE.register("electric_furnace", () -> TileEntityType.Builder.create(TileEntityElectricFurnace::new, BlockInit.ELECTRIC_FURNACE.get()).build(null)); public static final RegistryObject<TileEntityType<TileEntityCrusher>> CRUSHER_TE = TILE_ENTITY_TYPE.register("crusher", () -> TileEntityType.Builder.create(TileEntityCrusher::new, BlockInit.CRUSHER.get()).build(null)); public static final RegistryObject<TileEntityType<CopperEnergyCellTE>> COPPER_CELL_TE = TILE_ENTITY_TYPE.register("copper_cell", () -> TileEntityType.Builder.create(CopperEnergyCellTE::new, BlockInit.COPPER_ENERGY_CELL.get()).build(null)); public static final RegistryObject<TileEntityType<CopperCableTE>> COPPER_CABLE_TE = TILE_ENTITY_TYPE.register("copper_cable", () -> TileEntityType.Builder.create(CopperCableTE::new, BlockInit.COPPER_CABLE.get()).build(null)); /*public static final RegistryObject<TileEntityType<GoldCableTE>> GOLD_CABLE_TE = TILE_ENTITY_TYPE.register("gold_cable", () -> TileEntityType.Builder.create(GoldCableTE::new, BlockInit.COPPER_CABLE.get()).build(null)); public static final RegistryObject<TileEntityType<RedstoneCableTE>> REDSTONE_CABLE_TE = TILE_ENTITY_TYPE.register("redstone_cable", () -> TileEntityType.Builder.create(RedstoneCableTE::new, BlockInit.COPPER_CABLE.get()).build(null)); */ }  
    • Minecraft#mainWindow. You need to learn to use your IDE... 
  • Topics

  • Who's Online (See full list)