Jump to content

[UNSOLVED]Strange things happen with my energysystem[1.8]


ItsAMysteriousYT
 Share

Recommended Posts

Im working on an energysystem in my mod atm and a really weird bug accurd - when i connect the blocks with each other (using a variable in IEEP), then at some point the tileentity they are connected to is the same for all of them and sometimes even a tileentity that is not in the circuit. I don't know if the bug is positioned in the saving of the coordinates or somewhere else. Hopefully someone can help me fix this. Here are the classes i use:

TileEntity_Electric:

 

 

package itsamysterious.mods.reallifemod.core.blocks.tiles;

 

import itsamysterious.mods.reallifemod.core.tiles.RLMTileEntity;

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.server.gui.IUpdatePlayerListBox;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.util.BlockPos;

 

public class TileEntity_Electric extends RLMTileEntity implements IUpdatePlayerListBox{

public TileEntity_Electric from;

private float voltage;

private int age;

private boolean isConnected;

 

public TileEntity_Electric(String string) {

super(string);

 

}

 

public TileEntity_Electric(String string, int i) {

this(string);

this.rotation=i;

}

 

@Override

public void update() {

    if(from!=null){

    voltage = from.getVoltageValue();

    isConnected=true;

    }else{

    isConnected=false;

    }

   

}

 

 

    @Override

    public void writeToNBT(NBTTagCompound compound){

    NBTTagCompound tag=new NBTTagCompound();

    compound.setTag("RLMElectrizityTag", tag);

    if(from!=null){

    BlockPos pto = from.getPos();

    tag.setIntArray("ConectedTo", new int[]{pto.getX(),pto.getY(),pto.getZ()});

    }

    super.writeToNBT(compound);

 

    }

   

    @Override

    public void readFromNBT(NBTTagCompound compound) {

    super.readFromNBT(compound);

    NBTTagCompound rlmtag = compound.getCompoundTag("RLMTileTag");

    NBTTagCompound tag=rlmtag.getCompoundTag("RLMElectrizityTag");

    int[] i = tag.getIntArray("ConectedTo");

    if(i.length==3){

    //if(worldObj.isRemote&&worldObj.getTileEntity(new BlockPos(i[0],i[1],i[2])) instanceof TileEntity_Electric){

        //this.connectTo((TileEntity_Electric)worldObj.getTileEntity(new BlockPos(i[0],i[1],i[2])));

    // }

    }

worldObj.markBlockForUpdate(getPos());

    this.rotation=tag.getFloat("Rotation");

    }

 

public void connectTo(TileEntity_Electric t){

this.from = t;

}

 

public float getVoltageValue() {

float value=voltage;

this.voltage=0;

return value;

}

 

public float getVoltage() {

return voltage;

}

 

public void setVoltage(float voltage) {

this.voltage = voltage;

}

 

}

 

 

 

 

ItemCable(Connects the BLocks up):

 

 

package itsamysterious.mods.reallifemod.core.items;

 

import itsamysterious.mods.reallifemod.core.RealLifeMod_Blocks;

import itsamysterious.mods.reallifemod.core.blocks.tiles.TileEntity_Electric;

import itsamysterious.mods.reallifemod.core.lifesystem.RLMPlayerProps;

import net.minecraft.block.BlockAir;

import net.minecraft.client.Minecraft;

import net.minecraft.entity.Entity;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraft.util.BlockPos;

import net.minecraft.util.ChatComponentText;

import net.minecraft.util.EnumChatFormatting;

import net.minecraft.world.World;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

public class ItemCable extends Item{

 

public ItemCable() {

setUnlocalizedName("ItemCable");

GameRegistry.registerItem(this, getUnlocalizedName().substring(5));

}

 

@Override

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {

BlockPos pos = Minecraft.getMinecraft().objectMouseOver.getBlockPos();

RLMPlayerProps props = RLMPlayerProps.get(player);

if(world.getTileEntity(pos) instanceof TileEntity_Electric){

TileEntity_Electric toConnectTile = (TileEntity_Electric) world.getTileEntity(pos);

if(props.lastTile!=null&&props.lastTile!=toConnectTile){

toConnectTile.connectTo(props.lastTile);

props.lastTile=toConnectTile;

}

else{

player.addChatMessage(new ChatComponentText("Now in "+EnumChatFormatting.GREEN+"Connection Mode"+EnumChatFormatting.RESET+"To stop connecting, hold SHIFT+RIGHTCLICK! "));

props.lastTile = toConnectTile;

}

 

}else

{

if(world.getBlockState(pos).getBlock() instanceof BlockAir){

player.addChatMessage(new ChatComponentText("Stopped "+EnumChatFormatting.RED+"Connection Mode"));

props.lastTile=null;

}else

{

world.setBlockState(pos, RealLifeMod_Blocks.cable.getDefaultState());

}

 

}

return stack;

}

 

}

 

 

 

 

and some tileentities that extend TileEntity_Electric-perhaps the bug is in here:

LanternTileEntity

 

 

package itsamysterious.mods.reallifemod.core.blocks.tiles;

 

import itsamysterious.mods.reallifemod.core.tiles.RLMTileEntity;

import net.minecraft.block.state.IBlockState;

import net.minecraft.client.Minecraft;

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.network.NetworkManager;

import net.minecraft.network.Packet;

import net.minecraft.network.play.server.S35PacketUpdateTileEntity;

import net.minecraft.util.AxisAlignedBB;

import net.minecraft.util.BlockPos;

import net.minecraft.world.World;

 

public class TileEntity_Lantern extends TileEntity_Electric {

public float rotation;

public boolean isActive;

 

public TileEntity_Lantern() {

super("LanternTileentity");

}

 

public TileEntity_Lantern(int i) {

super("LanternTileentity");

float rot = i*90;

System.out.println(i);

this.rotation=rot;

}

 

    @Override

    public void writeToNBT(NBTTagCompound compound){

    NBTTagCompound tag=new NBTTagCompound();

    tag.setBoolean("IsActive", isActive);

    tag.setFloat("Rotation", rotation);

    compound.setTag("LanternTag", tag);

    super.writeToNBT(compound);

 

    }

   

    @Override

    public void readFromNBT(NBTTagCompound compound) {

    super.readFromNBT(compound);

    NBTTagCompound tag=compound.getCompoundTag("LanternTag");

    this.isActive=tag.getBoolean("IsActive");

    this.rotation=tag.getFloat("Rotation");

    }

 

    @Override

    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)

    {

      NBTTagCompound tag = pkt.getNbtCompound();

      readFromNBT(tag);

    }

   

    public Packet getDescriptionPacket()

    {

      NBTTagCompound tag = new NBTTagCompound();

      writeToNBT(tag);

      return new S35PacketUpdateTileEntity(getPos(), 1, tag);

    }

   

    @Override

    public void update(){

    super.update();

    if(getVoltage()>0){

    isActive=true;

    }else

    isActive=false;

   

    if(isActive){

    worldObj.getBlockState(getPos()).getBlock().setLightLevel(100.0f);

    }else

    {

    worldObj.getBlockState(getPos()).getBlock().setLightLevel(0);

    }

   

    }

   

    public AxisAlignedBB getRenderBoundingBox(){

return super.getRenderBoundingBox();

    }

}

 

 

 

 

TileEntity_Powerline:

 

 

public float rotation;

public boolean isActive;

int[] p;

 

public TileEntity_PowerLine() {

super("PowerLineTileEntity");

}

 

@Override

public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) {

return (oldState.getBlock() != newState.getBlock());

}

 

public TileEntity_PowerLine(int i) {

this();

float rot = i*90;

System.out.println(i);

this.rotation=rot;

}

 

@Override

public void updateContainingBlockInfo() {

super.updateContainingBlockInfo();

 

}

 

    @Override

    public void writeToNBT(NBTTagCompound compound){

    NBTTagCompound tag=new NBTTagCompound();

    tag.setBoolean("IsActive", isActive);

    tag.setFloat("Rotation", rotation);

    compound.setTag("PowerLineTag", tag);

    super.writeToNBT(compound);

 

    }

   

    @Override

    public void readFromNBT(NBTTagCompound compound) {

    super.readFromNBT(compound);

    NBTTagCompound tag=compound.getCompoundTag("PowerLineTag");

    this.isActive=tag.getBoolean("IsActive");

    this.rotation=tag.getFloat("Rotation");

    p=tag.getIntArray("TilePos");

    }

 

    @Override

    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)

    {

      NBTTagCompound tag = pkt.getNbtCompound();

      readFromNBT(tag);

    }

   

    public Packet getDescriptionPacket()

    {

      NBTTagCompound tag = new NBTTagCompound();

      writeToNBT(tag);

      return new S35PacketUpdateTileEntity(getPos(), 1, tag);

    }

   

    public AxisAlignedBB getRenderBoundingBox(){

return super.getRenderBoundingBox().expand(1000, 1000, 1000);

    }

   

    @Override

    public void update() {

    super.update();

    }

   

    @Override

    public float getVoltageValue() {

    return this.getVoltage();

    }

 

}

 

 

 

Link to comment
Share on other sites

  • Replies 99
  • Created
  • Last Reply

Top Posters In This Topic

public class ItemCable extends Item{
private static TileEntity_Electric lastTile;

 

i told you this already in two other posts. DONT USE STATIC if you have NO idea what it is doing. Dont save variables in the item classs u need to use NBT if u want them to save data

Link to comment
Share on other sites

Yes, i updated all my tiles so that the rotation is being set in OnBlockPlaced by and is initially set too zero. No i only have one constructor that looks like this:

 

public TileEntityElectric(){

  super("TileEntityElectric");

}

 

OH - maybe i can solve the problem if i register TileEntityElectric? Cuz its just a class that is never use as itself - only as extended class?

Link to comment
Share on other sites

Nah didn't solved it. I reworked some of the methods and classes but now some of the tileentities immediatly disappear after placing. I think it is caused by wrong saving to NBT. Here is the baseclass and the not working subclssses:

 

Baseclass:

 

 

package itsamysterious.mods.reallifemod.core.blocks.tiles;

 

import itsamysterious.mods.reallifemod.core.tiles.RLMTileEntity;

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.server.gui.IUpdatePlayerListBox;

import net.minecraft.util.BlockPos;

import net.minecraft.world.World;

 

public abstract class TileEntity_Electric extends RLMTileEntity implements IUpdatePlayerListBox{

public TileEntity_Electric to;

private float voltage;

private int age;

 

public TileEntity_Electric(String string) {

super(string);

}

 

@Override

public void update() {

if (!this.hasWorldObj()) return;

World world = this.getWorld();

if (world.isRemote) return; 

 

 

    if(to!=null){

    to.setVoltage(onPowered(voltage));

    }   

worldObj.markBlockForUpdate(getPos());

}

 

 

    @Override

    public void writeToNBT(NBTTagCompound compound){

    NBTTagCompound tag=new NBTTagCompound();

    if(to!=null){

    BlockPos pto = to.getPos();

    NBTTagCompound blockPosNBT = new NBTTagCompound();       

    blockPosNBT.setInteger("x", pto.getX());

    blockPosNBT.setInteger("y", pto.getY());

    blockPosNBT.setInteger("z", pto.getZ());

    compound.setTag("connectedBlock", blockPosNBT);   

    }

    compound.setTag("RLMElectrizityTag", tag);

    }

   

    @Override

    public void readFromNBT(NBTTagCompound compound) {

    super.readFromNBT(compound);

 

    final int NBT_INT_ID = 3;

 

    NBTTagCompound tag=compound.getCompoundTag("RLMElectrizityTag");

   

    NBTTagCompound blockPosNBT = compound.getCompoundTag("connectedBlock");

BlockPos readBlockPos = null;

if (blockPosNBT.hasKey("x", NBT_INT_ID) && blockPosNBT.hasKey("y", NBT_INT_ID) && blockPosNBT.hasKey("z", NBT_INT_ID) ) {

readBlockPos = new BlockPos(blockPosNBT.getInteger("x"), blockPosNBT.getInteger("y"), blockPosNBT.getInteger("z"));

}

if (readBlockPos == null ) {

System.err.println("testBlockPos mismatch:" + readBlockPos);

}

if(readBlockPos!=null&&worldObj.getTileEntity(readBlockPos) instanceof TileEntity_Electric){

this.to = (TileEntity_Electric) worldObj.getTileEntity(readBlockPos);

}

    }

 

public void connectTo(TileEntity_Electric t){

this.to = t;

}

 

public float getVoltageValue() {

return voltage;

}

 

public float getVoltage() {

return voltage;

}

 

public void setVoltage(float voltage) {

this.voltage = voltage;

}

 

public float onPowered(float f){

worldObj.markBlockForUpdate(getPos());

return f;

}

 

}

 

 

 

 

Subclass:

 

 

package itsamysterious.mods.reallifemod.core.blocks.tiles;

 

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.network.NetworkManager;

import net.minecraft.network.Packet;

import net.minecraft.network.play.server.S35PacketUpdateTileEntity;

import net.minecraft.util.AxisAlignedBB;

import scala.collection.generic.VolatileAbort;

 

public class TileEntity_Lantern extends TileEntity_Electric {

public boolean isActive;

 

public TileEntity_Lantern() {

super("LanternTileentity");

}

 

    @Override

    public void writeToNBT(NBTTagCompound compound){

    super.writeToNBT(compound);

    NBTTagCompound tag=new NBTTagCompound();

    tag.setBoolean("IsActive", isActive);

    compound.setTag("LanternTag", tag);

 

    }

   

    @Override

    public void readFromNBT(NBTTagCompound compound) {

    super.readFromNBT(compound);

    NBTTagCompound tag=compound.getCompoundTag("LanternTag");

    this.isActive=tag.getBoolean("IsActive");

    }

 

    @Override

    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)

    {

      NBTTagCompound tag = pkt.getNbtCompound();

      readFromNBT(tag);

    }

   

    public Packet getDescriptionPacket()

    {

      NBTTagCompound tag = new NBTTagCompound();

      writeToNBT(tag);

      return new S35PacketUpdateTileEntity(getPos(), 1, tag);

    }

   

    @Override

    public void update(){

    super.update();

    if(getVoltage()>0){

    isActive=true;

    }else

    isActive=false;

   

    if(isActive){

    worldObj.getBlockState(getPos()).getBlock().setLightLevel(100.0f);

    }else

    {

    worldObj.getBlockState(getPos()).getBlock().setLightLevel(0);

    }

   

    }

   

    public AxisAlignedBB getRenderBoundingBox(){

return super.getRenderBoundingBox();

    }

 

@Override

public float onPowered(float f) {

    if(isActive){

    worldObj.getBlockState(getPos()).getBlock().setLightLevel(100.0f);

    }else

    {

    worldObj.getBlockState(getPos()).getBlock().setLightLevel(0);

    }

this.setVoltage(f);

return f;

}

 

}

 

 

 

 

Subclass 2:

 

 

package itsamysterious.mods.reallifemod.core.blocks.tiles;

 

import itsamysterious.mods.reallifemod.core.blocks.electrisity.BlockPowerLine;

import itsamysterious.mods.reallifemod.core.tiles.RLMTileEntity;

import net.minecraft.block.state.IBlockState;

import net.minecraft.client.Minecraft;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.network.NetworkManager;

import net.minecraft.network.Packet;

import net.minecraft.network.play.server.S35PacketUpdateTileEntity;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.util.AxisAlignedBB;

import net.minecraft.util.BlockPos;

import net.minecraft.world.World;

 

public class TileEntity_PowerLine extends TileEntity_Electric{

 

public TileEntity_PowerLine() {

super("PowerLineTileEntity");

}

 

@Override

public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) {

return (oldState.getBlock() != newState.getBlock());

}

 

    @Override

    public void writeToNBT(NBTTagCompound compound){

    super.writeToNBT(compound);

    }

   

    @Override

    public void readFromNBT(NBTTagCompound compound) {

    super.readFromNBT(compound);

    }

 

    @Override

    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)

    {

      NBTTagCompound tag = pkt.getNbtCompound();

      readFromNBT(tag);

    }

   

    public Packet getDescriptionPacket()

    {

      NBTTagCompound tag = new NBTTagCompound();

      writeToNBT(tag);

      return new S35PacketUpdateTileEntity(getPos(), 1, tag);

    }

   

    public AxisAlignedBB getRenderBoundingBox(){

return super.getRenderBoundingBox();

    }

   

    @Override

    public void update() {

    super.update();

    }

   

@Override

public float onPowered(float f) {

return f;

}

 

}

 

 

 

Link to comment
Share on other sites

OMG - MY stupidness solved the disappearing - i forgot to do super.writeToNBT() in TileENtity_Electric witch caused that all entities without NBT were okay and those with NBT where removed. But now the saving of the connected tile won't work. I try writing the BlockPos of the tile to NBT like this:

 

 

 

    @Override

    public void writeToNBT(NBTTagCompound compound){

    super.writeToNBT(compound);

    NBTTagCompound tag=new NBTTagCompound();

    if(to!=null){

    BlockPos pto = to.getPos();

    NBTTagCompound blockPosNBT = new NBTTagCompound();       

    blockPosNBT.setInteger("x", pto.getX());

    blockPosNBT.setInteger("y", pto.getY());

    blockPosNBT.setInteger("z", pto.getZ());

    compound.setTag("connectedBlock", blockPosNBT);   

    }

    compound.setTag("RLMElectrizityTag", tag);

    }

   

    @Override

    public void readFromNBT(NBTTagCompound compound) {

    super.readFromNBT(compound);

 

    final int NBT_INT_ID = 3;

 

    NBTTagCompound tag=compound.getCompoundTag("RLMElectrizityTag");

   

    NBTTagCompound blockPosNBT = compound.getCompoundTag("connectedBlock");

BlockPos readBlockPos = null;

if (blockPosNBT.hasKey("x", NBT_INT_ID) && blockPosNBT.hasKey("y", NBT_INT_ID) && blockPosNBT.hasKey("z", NBT_INT_ID) ) {

readBlockPos = new BlockPos(blockPosNBT.getInteger("x"), blockPosNBT.getInteger("y"), blockPosNBT.getInteger("z"));

}

if(worldObj!=null&&readBlockPos!=null&&worldObj.getTileEntity(readBlockPos) instanceof TileEntity_Electric){

to = (TileEntity_Electric) worldObj.getTileEntity(readBlockPos);

}

    }

 

 

 

But when i close the world and open it again, the 'to' variable isn't set.

 

Link to comment
Share on other sites

There is no world yet in

readFromNBT

.

 

So what im doing there atm will work in the future ? Cuz you say there is no fututre Yet. Also - the onBlockPlacedBy method i tried isn't working. Do i have to put it in the subclasses to?

 

public abstract class RLMBlockContainer extends Block implements ITileEntityProvider{

public RLMBlockContainer(Material materialIn) {
	super(materialIn);
}

@Override
public abstract TileEntity createNewTileEntity(World worldIn, int meta);

    public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
    	super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
    	 TileEntity tileentity = worldIn.getTileEntity(pos);
         if (tileentity instanceof RLMTileEntity){
        	 RLMTileEntity tile = (RLMTileEntity)tileentity;
        	 tile.rotation = 90 * MathHelper.floor_double((double)(placer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
        	 worldIn.markBlockForUpdate(pos);
             System.out.println("Succesfully rotated "+tile.getName());
         }
    }
    
    @SideOnly(Side.CLIENT)
    public EnumWorldBlockLayer getBlockLayer()
    {
      return EnumWorldBlockLayer.SOLID;
    }
    
    @Override
    public boolean isFullCube() {
    	return true;
    }

Link to comment
Share on other sites

only read the position and access the tileentity when you need it

 

But i need to load it up immediatly, so the electrizity is being cast when player joines in world. So can i just set a global variable and in the update method put something like that:

 

if(to==null&&toCoords!=null){
  this.to=(TileEntity_Electric)worldObj.getTileEntity(toCoords);
}

Link to comment
Share on other sites

I have no idea what you are trying to say with the "no future yet" stuff. Are you attempting time travel?

 

About the TE, use lazy initialization. And keeping a strong reference to the other TE is a bad idea, it will cause memory leaks.

Oh HAHA no :P Must have been thinking of something else and wrote future :) What i wanted to ask is if there will be a world in readFromNBT later.

And for the tile - what you mean with lazy initialization? And also the tile need to know where to send the signal to or not im not connecting the two blocks with redstone or simillar blocklike structurs but just with cables that are rendered in the TESR if the tile. Thats why i need the 'to' variable in the class (if you mean that with strong reference :P)

Link to comment
Share on other sites

I don't care if you think that you "need" the reference to the TE. Keeping it there is a bad idea. If the other chunk unloads you will keep the TE instance alive and you have created a memory leak. If the chunk is then loaded again the next problem arises: You now have a reference to the wrong (dead) TE instance.

 

For lazy initialization: Google.

Link to comment
Share on other sites

This is how my TileEntity_Electric looks now - please tell me how i have to fix it im so lost on this i have absolutly no idea what im doing wrong :'(

I read that lazy initalization stuff but i do not understand the use of it e an also - how should i pass over the energy to the connected tile when i do not have a field.

 

MAN -IM SO LOST

 

Diesieben07 what you mean? How do i have to use that lazy stuff ?

 

package itsamysterious.mods.reallifemod.core.blocks.tiles;

import java.util.Random;

import itsamysterious.mods.reallifemod.core.tiles.RLMTileEntity;
import net.minecraft.client.Minecraft;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.World;

public abstract class TileEntity_Electric extends RLMTileEntity implements IUpdatePlayerListBox{
private float voltage;
private boolean isUsuable;
private int age;
public BlockPos storedPos;
private TileEntity_Electric to;

public TileEntity_Electric getTo() {
	return to;
}

public TileEntity_Electric(String string) {
	super(string);
	isUsuable=true;
}

@Override
public void update() {
	if (!this.hasWorldObj()) return;
	World world = this.getWorld();

	if(worldObj.isRemote){
		Random rand = new Random();
		if(!isUsuable){
			if(Minecraft.getMinecraft().thePlayer.ticksExisted%3==0)
			worldObj.spawnParticle(EnumParticleTypes.CLOUD, pos.getX()+0.5, pos.getY()+1, pos.getZ()+0.5, -0.025+rand.nextFloat()/10,rand.nextDouble()/5, -0.025+rand.nextFloat()/10);
		}
	}else
	{

		if(storedPos!=null){
			if(world.getTileEntity(storedPos)instanceof TileEntity_Electric){
				to=(TileEntity_Electric)world.getTileEntity(storedPos);
			}
		}

		if(voltage>getMaxVoltage()){
			isUsuable=false;
		}

    	if(to!=null){
    		to.setVoltage(onPowered(this.voltage));
			world.markBlockForUpdate(storedPos);
    	}   
    	if(storedPos!=null&&worldObj.getTileEntity(storedPos)==null){
    		to=null;
    		storedPos=null;
    	}
	}
}


    @Override
    public void writeToNBT(NBTTagCompound compound){
    	super.writeToNBT(compound);
    	NBTTagCompound tag=new NBTTagCompound();
    	if(storedPos!=null){
    		BlockPos pto = storedPos;
    		NBTTagCompound blockPosNBT = new NBTTagCompound();        
    		blockPosNBT.setInteger("x", pto.getX());
    		blockPosNBT.setInteger("y", pto.getY());
    		blockPosNBT.setInteger("z", pto.getZ());
    		tag.setTag("connectedBlock", blockPosNBT);    	
    	}
    	tag.setBoolean("IsUsuable", isUsuable);
    	compound.setTag("RLMElectrizityTag", tag);
    }
    
    @Override
    public void readFromNBT(NBTTagCompound compound) {
    	super.readFromNBT(compound);

    	final int NBT_INT_ID = 3;

    	NBTTagCompound tag=compound.getCompoundTag("RLMElectrizityTag");
    	
    	NBTTagCompound blockPosNBT = tag.getCompoundTag("connectedBlock");
	BlockPos readBlockPos = null;
	if (blockPosNBT.hasKey("x", NBT_INT_ID) && blockPosNBT.hasKey("y", NBT_INT_ID) && blockPosNBT.hasKey("z", NBT_INT_ID) ) {
		readBlockPos = new BlockPos(blockPosNBT.getInteger("x"), blockPosNBT.getInteger("y"), blockPosNBT.getInteger("z"));
		storedPos=readBlockPos;
	}

	isUsuable=tag.getBoolean("IsUsuable");
    }
    
@Override
public Packet getDescriptionPacket() {
	NBTTagCompound nbtTagCompound = new NBTTagCompound();
	writeToNBT(nbtTagCompound);
	int metadata = getBlockMetadata();
	return new S35PacketUpdateTileEntity(this.pos, metadata, nbtTagCompound);
}

@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
	readFromNBT(pkt.getNbtCompound());
}

public void connectTo(TileEntity_Electric t){
	this.to=t;
	this.storedPos = t.getPos();
}

public float getVoltageValue() {
	return voltage;
}

public float getVoltage() {
	return this.voltage;
}

public void setVoltage(float voltage) {
	this.voltage = voltage;
}

public float onPowered(float f){
	return f;
}

public abstract float getMaxVoltage();

}

Link to comment
Share on other sites

1) Why is this class abstract?

2) Why are you writing the block metadata to the description packet? (You're ignoring it when the packet arrives, too)

3) Your "connectTo" function is never called, making storedPos always null (unless its being called from another class you haven't posted)

4) Why are you getting the World and saving it to the local variable world when you have access to (and use!) worldObj?

5) Why are you using

Minecraft.getMinecraft().thePlayer

?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

1. So classes that extend on it have the required methods (e.g) getMaxVoltag()

2. just copied that from here: https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe20_tileentity_data/TileEntityData.java

3. It is is called in an  ItemCable class like this

 

 

@Override

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {

BlockPos pos = Minecraft.getMinecraft().objectMouseOver.getBlockPos();

RLMPlayerProps props = RLMPlayerProps.get(player);

if(world.getTileEntity(pos) instanceof TileEntity_Electric){

TileEntity_Electric toConnectTile = (TileEntity_Electric) world.getTileEntity(pos);

if(props.lastTile!=null&&props.lastTile!=toConnectTile){

props.lastTile.connectTo(toConnectTile);

world.markBlockForUpdate(props.lastTile.getPos());

props.lastTile=toConnectTile;

}

else{

player.addChatMessage(new ChatComponentText("Now in "+EnumChatFormatting.GREEN+"Connection Mode"+EnumChatFormatting.RESET+"To stop connecting, hold SHIFT+RIGHTCLICK! "));

props.lastTile = toConnectTile;

}

 

}else

{

if(world.getBlockState(pos).getBlock() instanceof BlockAir){

player.addChatMessage(new ChatComponentText("Stopped "+EnumChatFormatting.RED+"Connection Mode"));

props.lastTile=null;

}else

{

world.setBlockState(pos, RealLifeMod_Blocks.cable.getDefaultState());

}

 

}

return stack;

}

 

 

 

4: Just copied that too

5: cuz TileEntity hasn't got a ticksexisted field

Link to comment
Share on other sites

1) ok, wasn't arbitrary. I still don't think you need to make the class abstract, but whatever.

2,4) Mmm...copy-pasta..

3) this method makes me cry.

 

5: cuz TileEntity hasn't got a ticksexisted field

 

And it will crash a dedicated server.  Good job.

 

So add one yourself.  It's got an update function, hasn't it?  You can create properties yes?  You can increment a counter in the update function, no?  Bloody freaking magic that is.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share




  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • ---- Minecraft Crash Report ---- // Why did you do that? Time: 12/3/22, 1:41 AM Description: Initializing game org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156) ~[modlauncher-9.1.3.jar:9.1.3+9.1.3+main.9b69c82a] {}     at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:110) ~[securejarhandler-1.0.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.lambda$findClass$16(ModuleClassLoader.java:216) ~[securejarhandler-1.0.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:226) ~[securejarhandler-1.0.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:216) ~[securejarhandler-1.0.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:132) ~[securejarhandler-1.0.3.jar:?] {}     at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:503) ~[client-1.18.2-20220404.173914-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:apoli.mixins.json:MinecraftClientMixin,pl:mixin:APP:rubidium.mixins.json:core.MixinMinecraftClient,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:imm_ptl.mixins.json:client.MixinMinecraft,pl:mixin:APP:imm_ptl.mixins.json:client.block_manipulation.MixinMinecraft_B,pl:mixin:APP:imm_ptl.mixins.json:client.sync.MixinMinecraft_RedirectedPacket,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:spyglass_improvements.mixins.json:MinecraftMixin,pl:mixin:APP:betterthirdperson.mixins.json:MinecraftMixin,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:blueprint.mixins.json:client.MinecraftMixin,pl:mixin:APP:travelerstitles.mixins.json:MinecraftClientTickMixin,pl:mixin:APP:mixin.dynamic_asset_generator.json:MinecraftMixin,pl:mixin:APP:iceberg.mixins.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:169) ~[client-1.18.2-20220404.173914-srg.jar%23266!/:?] {re:classloading,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) ~[fmlloader-1.18.2-40.1.86.jar%2317!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {} Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [chunkanimator.mixins.json:LevelRendererMixin] from phase [DEFAULT] in config [chunkanimator.mixins.json] FAILED during APPLY     at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:636) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:588) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:379) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     ... 28 more Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @At("INVOKE") on net/minecraft/client/renderer/LevelRenderer::preventDefaultOffset with priority 1000 cannot inject into net/minecraft/client/renderer/LevelRenderer::m_172993_(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)V merged by me.jellysquid.mods.sodium.mixin.features.chunk_rendering.MixinWorldRenderer with priority 1000 [PREINJECT Applicator Phase -> chunkanimator.mixins.json:LevelRendererMixin -> Prepare Injections ->  -> redirect$dba000$preventDefaultOffset(Lcom/mojang/blaze3d/shaders/Uniform;FFF)V -> Prepare]     at org.spongepowered.asm.mixin.injection.code.Injector.findTargetNodes(Injector.java:305) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.injection.code.Injector.find(Injector.java:240) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.prepare(InjectionInfo.java:421) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1319) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1042) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:393) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     ... 28 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156) ~[modlauncher-9.1.3.jar:9.1.3+9.1.3+main.9b69c82a] {}     at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:110) ~[securejarhandler-1.0.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.lambda$findClass$16(ModuleClassLoader.java:216) ~[securejarhandler-1.0.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:226) ~[securejarhandler-1.0.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:216) ~[securejarhandler-1.0.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:132) ~[securejarhandler-1.0.3.jar:?] {}     at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:503) ~[client-1.18.2-20220404.173914-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:apoli.mixins.json:MinecraftClientMixin,pl:mixin:APP:rubidium.mixins.json:core.MixinMinecraftClient,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:imm_ptl.mixins.json:client.MixinMinecraft,pl:mixin:APP:imm_ptl.mixins.json:client.block_manipulation.MixinMinecraft_B,pl:mixin:APP:imm_ptl.mixins.json:client.sync.MixinMinecraft_RedirectedPacket,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:spyglass_improvements.mixins.json:MinecraftMixin,pl:mixin:APP:betterthirdperson.mixins.json:MinecraftMixin,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:blueprint.mixins.json:client.MinecraftMixin,pl:mixin:APP:travelerstitles.mixins.json:MinecraftClientTickMixin,pl:mixin:APP:mixin.dynamic_asset_generator.json:MinecraftMixin,pl:mixin:APP:iceberg.mixins.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A} -- Initialization -- Details:     Modules:          ADVAPI32.dll:API de base do Windows 32 avançada:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         COMCTL32.dll:Biblioteca de Controles de Experiência do Usuário:6.10 (WinBuild.160101.0800):Microsoft Corporation         CRYPT32.dll:Crypto API32:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         CRYPTBASE.dll:Base cryptographic API DLL:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         CRYPTSP.dll:Cryptographic Service Provider API:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         ColorAdapterClient.dll:Microsoft Color Adapter Client:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         CoreMessaging.dll:Microsoft CoreMessaging Dll:10.0.19041.2193:Microsoft Corporation         CoreUIComponents.dll:Microsoft Core UI Components Dll:10.0.19041.546:Microsoft Corporation         DBGHELP.DLL:Windows Image Helper:10.0.19041.867 (WinBuild.160101.0800):Microsoft Corporation         DEVOBJ.dll:Device Information Set DLL:10.0.19041.1620 (WinBuild.160101.0800):Microsoft Corporation         DNSAPI.dll:DLL da API de cliente DNS:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         GDI32.dll:GDI Client DLL:10.0.19041.2130 (WinBuild.160101.0800):Microsoft Corporation         GLU32.dll:DLL da biblioteca de utilitários OpenGL:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         HID.DLL:Biblioteca de Usuário de HID:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         IMM32.DLL:Multi-User Windows IMM32 API Client DLL:10.0.19041.2193 (WinBuild.160101.0800):Microsoft Corporation         IPHLPAPI.DLL:API de Auxiliar de IP:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         KERNEL32.DLL:DLL cliente da API BASE do Windows NT:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         KERNELBASE.dll:DLL cliente da API BASE do Windows NT:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         MMDevApi.dll:API do MMDevice:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         MSASN1.dll:ASN.1 Runtime APIs:10.0.19041.2251 (WinBuild.160101.0800):Microsoft Corporation         MSCTF.dll:DLL de servidor MSCTF:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         NLAapi.dll:Network Location Awareness 2:10.0.19041.2193 (WinBuild.160101.0800):Microsoft Corporation         NSI.dll:NSI User-mode interface DLL:10.0.19041.610 (WinBuild.160101.0800):Microsoft Corporation         NTASN1.dll:Microsoft ASN.1 API:10.0.19041.1 (WinBuild.160101.0800):Microsoft Corporation         Ole32.dll:Microsoft OLE para Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         OleAut32.dll:OLEAUT32.DLL:10.0.19041.985 (WinBuild.160101.0800):Microsoft Corporation         OpenAL.dll         POWRPROF.dll:DLL do Auxiliar do Perfil de Energia:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         PROPSYS.dll:Sistema de Propriedades  Microsoft:7.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         PSAPI.DLL:Process Status Helper:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         Pdh.dll:DLL auxiliar de dados de desempenho do Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         RPCRT4.dll:Tempo de Execução da Chamada de Procedimento Remoto:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         SETUPAPI.DLL:API de instalação do Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         SHCORE.dll:SHCORE:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         SHELL32.dll:DLL comum do Shell do Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         UMPDC.dll         USER32.dll:DLL de cliente API de usuário Windows para multiusuários:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         USERENV.dll:Userenv:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         VCRUNTIME140.dll:Microsoft® C Runtime Library:14.29.30133.0 built by: vcwrkspc:Microsoft Corporation         VERSION.dll:Version Checking and File Installation Libraries:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         WINHTTP.dll:Windows HTTP Services:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         WINMM.dll:MCI API DLL:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         WINSTA.dll:Winstation Library:10.0.19041.2075 (WinBuild.160101.0800):Microsoft Corporation         WINTRUST.dll:Microsoft Trust Verification APIs:10.0.19041.2193 (WinBuild.160101.0800):Microsoft Corporation         WS2_32.dll:DLL de 32 bits do Windows Socket 2.0:10.0.19041.1081 (WinBuild.160101.0800):Microsoft Corporation         WSOCK32.dll:Windows Socket 32-Bit DLL:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         WTSAPI32.dll:Windows Remote Desktop Session Host Server SDK APIs:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         Wldp.dll:Política de Bloqueio do Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         amsi.dll:Anti-Malware Scan Interface:10.0.19041.2075 (WinBuild.160101.0800):Microsoft Corporation         aswAMSI.dll:Avast AMSI COM object:22.11.7716.0:AVAST Software         bcrypt.dll:Biblioteca de Primitivos Criptografados do Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         bcryptPrimitives.dll:Windows Cryptographic Primitives Library:10.0.19041.1415 (WinBuild.160101.0800):Microsoft Corporation         cfgmgr32.dll:Configuration Manager DLL:10.0.19041.1620 (WinBuild.160101.0800):Microsoft Corporation         clbcatq.dll:COM+ Configuration Catalog:2001.12.10941.16384 (WinBuild.160101.0800):Microsoft Corporation         combase.dll:Microsoft COM para Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         cryptnet.dll:Crypto Network Related API:10.0.19041.906 (WinBuild.160101.0800):Microsoft Corporation         dbgcore.DLL:Windows Core Debugging Helpers:10.0.19041.789 (WinBuild.160101.0800):Microsoft Corporation         dhcpcsvc.DLL:Serviço do Cliente DHCP:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         dhcpcsvc6.DLL:Cliente DHCPv6:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         dinput8.dll:Microsoft DirectInput:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         drvstore.dll:Driver Store API:10.0.19041.1949 (WinBuild.160101.0800):Microsoft Corporation         dwmapi.dll:API do Gerenciador de Janelas da Área de Trabalho Microsoft:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         dxcore.dll:DXCore:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         fwpuclnt.dll:API de Modo de Usuário FWP/IPsec:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         gdi32full.dll:GDI Client DLL:10.0.19041.2130 (WinBuild.160101.0800):Microsoft Corporation         glfw.dll         icm32.dll:Microsoft Color Management Module (CMM):10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         inputhost.dll:InputHost:10.0.19041.1741 (WinBuild.160101.0800):Microsoft Corporation         java.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         javaw.exe:OpenJDK Platform binary:17.0.1.0:Microsoft         jimage.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         jli.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         jna15256546126711392644.dll:JNA native library:6.1.2:Java(TM) Native Access (JNA)         jvm.dll:OpenJDK 64-Bit server VM:17.0.1.0:Microsoft         kernel.appcore.dll:AppModel API Host:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         lwjgl.dll         lwjgl_opengl.dll         lwjgl_stb.dll         management.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         management_ext.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         mscms.dll:DLL do Sistema de Correspondência de Cores Microsoft:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         msvcp140.dll:Microsoft® C Runtime Library:14.29.30133.0 built by: vcwrkspc:Microsoft Corporation         msvcp_win.dll:Microsoft® C Runtime Library:10.0.19041.789 (WinBuild.160101.0800):Microsoft Corporation         msvcrt.dll:Windows NT CRT DLL:7.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         mswsock.dll:Provedor de serviços do Microsoft Windows Sockets 2.0:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         napinsp.dll:Provedor de Correção de Nomeação de Emails:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         ncrypt.dll:Roteador NCrypt do Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         net.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         nio.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         ntdll.dll:DLL de nível do NT:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         ntmarta.dll:Provedor MARTA do Windows NT:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         nvoglv64.dll:NVIDIA Compatible OpenGL ICD:31.0.15.1694:NVIDIA Corporation         nvspcap64.dll:NVIDIA Game Proxy:3.26.0.154:NVIDIA Corporation         opengl32.dll:OpenGL Client DLL:10.0.19041.2193 (WinBuild.160101.0800):Microsoft Corporation         perfos.dll:DLL de objetos de desempenho de sistema do Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         pnrpnsp.dll:PNRP Name Space Provider:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         profapi.dll:User Profile Basic API:10.0.19041.844 (WinBuild.160101.0800):Microsoft Corporation         rasadhlp.dll:Remote Access AutoDial Helper:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         rsaenh.dll:Microsoft Enhanced Cryptographic Provider:10.0.19041.1 (WinBuild.160101.0800):Microsoft Corporation         sechost.dll:Host for SCM/SDDL/LSA Lookup APIs:10.0.19041.1 (WinBuild.160101.0800):Microsoft Corporation         shlwapi.dll:Biblioteca de utilitário abreviado para Shell:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         sunmscapi.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         svml.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         textinputframework.dll:"TextInputFramework.DYNLINK":10.0.19041.2075 (WinBuild.160101.0800):Microsoft Corporation         ucrtbase.dll:Microsoft® C Runtime Library:10.0.19041.789 (WinBuild.160101.0800):Microsoft Corporation         uxtheme.dll:Biblioteca UxTheme Microsoft:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         vcruntime140_1.dll:Microsoft® C Runtime Library:14.29.30133.0 built by: vcwrkspc:Microsoft Corporation         verify.dll:OpenJDK Platform binary:17.0.1.0:Microsoft         win32u.dll:Win32u:10.0.19041.2251 (WinBuild.160101.0800):Microsoft Corporation         windows.storage.dll:API de Armazenamento Microsoft WinRT:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         winrnr.dll:LDAP RnR Provider DLL:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         wintypes.dll:DLL dos Tipos de Base do Windows:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         wshbth.dll:Windows Sockets Helper DLL:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation         xinput1_4.dll:API do Controlador Comum da Microsoft:10.0.19041.2248 (WinBuild.160101.0800):Microsoft Corporation         zip.dll:OpenJDK Platform binary:17.0.1.0:Microsoft Stacktrace:     at net.minecraft.client.main.Main.main(Main.java:169) ~[client-1.18.2-20220404.173914-srg.jar%23266!/:?] {re:classloading,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) ~[fmlloader-1.18.2-40.1.86.jar%2317!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {} -- System Details -- Details:     Minecraft Version: 1.18.2     Minecraft Version ID: 1.18.2     Operating System: Windows 10 (amd64) version 10.0     Java Version: 17.0.1, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 2767274184 bytes (2639 MiB) / 3523215360 bytes (3360 MiB) up to 9663676416 bytes (9216 MiB)     CPUs: 8     Processor Vendor: GenuineIntel     Processor Name: Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz     Identifier: Intel64 Family 6 Model 165 Stepping 2     Microarchitecture: unknown     Frequency (GHz): 2.50     Number of physical packages: 1     Number of physical CPUs: 4     Number of logical CPUs: 8     Graphics card #0 name: Intel(R) UHD Graphics     Graphics card #0 vendor: Intel Corporation (0x8086)     Graphics card #0 VRAM (MB): 1024.00     Graphics card #0 deviceId: 0x9bc4     Graphics card #0 versionInfo: DriverVersion=30.0.100.9864     Graphics card #1 name: NVIDIA GeForce GTX 1650     Graphics card #1 vendor: NVIDIA (0x10de)     Graphics card #1 VRAM (MB): 4095.00     Graphics card #1 deviceId: 0x1f99     Graphics card #1 versionInfo: DriverVersion=31.0.15.1694     Memory slot #0 capacity (MB): 8192.00     Memory slot #0 clockSpeed (GHz): 3.20     Memory slot #0 type: DDR4     Memory slot #1 capacity (MB): 8192.00     Memory slot #1 clockSpeed (GHz): 3.20     Memory slot #1 type: DDR4     Virtual memory max (MB): 20823.05     Virtual memory used (MB): 12036.39     Swap memory total (MB): 4608.00     Swap memory used (MB): 109.69     JVM Flags: 4 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx9216m -Xms256m     Launched Version: forge-40.1.86     Backend library: LWJGL version 3.2.2 SNAPSHOT     Backend API: NVIDIA GeForce GTX 1650/PCIe/SSE2 GL version 4.6.0 NVIDIA 516.94, NVIDIA Corporation     Window size: <not initialized>     GL Caps: Using framebuffer using OpenGL 3.2     GL debug messages:      Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'forge'     Type: Client (map_client.txt)     CPU: 8x Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz     ModLauncher: 9.1.3+9.1.3+main.9b69c82a     ModLauncher launch target: forgeclient     ModLauncher naming: srg     ModLauncher services:           mixin PLUGINSERVICE           eventbus PLUGINSERVICE           slf4jfixer PLUGINSERVICE           object_holder_definalize PLUGINSERVICE           runtime_enum_extender PLUGINSERVICE           capability_token_subclass PLUGINSERVICE           accesstransformer PLUGINSERVICE           runtimedistcleaner PLUGINSERVICE           mixin TRANSFORMATIONSERVICE           fml TRANSFORMATIONSERVICE      FML Language Providers:          minecraft@1.0         lowcodefml@null         javafml@null     Mod List:          client-1.18.2-20220404.173914-srg.jar             |Minecraft                     |minecraft                     |1.18.2              |NONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f         forge-1.18.2-40.1.86-universal.jar                |Forge                         |forge                         |40.1.86             |NONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90
    • Здравствуйте , столкнулся с проблемой после сброса (отчистки пк) от посторонних файлов сервер перестал запускаться решил переустановить по инструкции но после 2 запуска пишет Ignoring unknown attribute 'forge.swimSpeed' [12:24:45 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:45 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:45 INFO]: Preparing spawn area: 59% [12:24:45 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:45 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:45 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 WARN]: Ignoring unknown attribute 'forge.swimSpeed' [12:24:46 INFO]: Done (2,046s)! For help, type "help" or "?"  в командной строке что с этим делать? сразу я этому не предал значение но после редактирования в файле server.properties (айпи сервера и online mode true изменил на online-mode=false вроде так называется) перестал запускаться а именно консоль открывается и закрывается после я поместил файл start.bat в командную строку пишет C:\Users\User>"C:\ddddd\bin\java.exe" -Xmx1024M -Xms1024M -jar forge-1.12.2-14.23.5.2860.jar nogui Error: Unable to access jarfile forge-1.12.2-14.23.5.2860.jar сервер не работает но до отчистки работал можете пожалуйста сказать почему и как это исправить сам пытался переустанавливать уже 2 недели прошло с того момента как не запускается все гайды пересмотрел не помогает   
    • Im using forge to play modded 1.18.2 with optifine. There is no problem launching the game however whenever I try to join a world, it crashes saying "an unexpected error occurred"  heres the crash log https://pastebin.com/yX5Y5kEH
    • Thank you so much! I deleted Oculus and it seems to work just fine. I'll do more to update see what was the interaction or exact thing that made it crash. Thanks again so much for your help!
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.