Jump to content

NBT's are not saving or saving too soon when the game is quit


kris91268

Recommended Posts

try
{
return (TileEntity)theTileEntityClass.newInstance();
}
    catch (Exception e)
{
throw new RuntimeException();
}

this seems overkill:

 

public class TileEntityGravityLift extends TileEntity

<-- cant you just

return new TileEntityGravityLift();

(if you know what you're doing, can i ask which different tile entity you intend to use for the same block, out of curiosity :P, also, if you are going to use more then 1 type of tile entity on the same block (weird but :P)

you coudl do something like this in your constructor:

public class BlockGravityLift extends BlockContainer implements BlockProxy{
    public TileEntity theTileEntityClass;

    public BlockGravityLift(int id, Class<? extends TileEntity> theClass){
        theTileEntityClass = theClass;
    }

    public TileEntity createTileEntity(World world, int meta){
        try{
            return theTileEntityClass.newInstance();
        }catch(Exception e){
            System.out.println("this will only print if the TileEntity doesn't have a 0 argument constructor");
        }
    }

}

because  Class<? extends TileEntity> mean that it will crash at compile time if its not a subclass of TileEntity

 

 

 

public class TileEntityGravityLift extends TileEntity
{
private String aString;
public Double height = new Double(0.0D);

are you using the Double object elsewhere? because you could probably use the primitive type "double" (without the capital)

 

protip, you can transform number into string by addign the empty string ("") to any primitive type:

double d = 5;
String dToString = d+"";

you still have to use the parse method to revert to primitive type

 

 

 

not code impacting at all, but your button have weird name:

private GuiButton decByPointZeroOne;//-0.01   this guy here 
private GuiButton decByPointOne;//-0.1
private GuiButton incByPointOne;//+0.1
private GuiButton incByOnePointZero;//+1.0

 

public void initGui()
{
	super.initGui();
	this.buttonList.clear();

in this case it doesnt matter but if you were extending someone else gui that was doing stuff in its initGui(), the method clear() would wipe all his changes

 

 

btw MineMaarten is right, you need to sendPacketToServer, not sendPacketToAllPlayers, you want to tell the SERVER that you have changed the tile entity

 

also send the x, y, z of the tile entity, the server doesnt know which block you're talking about

 

and finally you might want to also send the dimentionID to prevent a very rare vanilla bug from happening

 

i prefer to use Packet250CustomPayload // that only a matter of opinion, sorry :P

 

heres 2 tutorial i made that could help

 

synchronizing tile entities:

http://www.minecraftforge.net/wiki/Synchronizing_tile_entities

 

organising packer handlers:

http://www.minecraftforge.net/wiki/Organising_packet_handlers

 

warning, i dont explain basic java in there

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

update your code, not sure which version is the right one, also feel free to give a thank you to whoever helped you (i actually legit dont know what fixed your code, and who fixed it)

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

You solved the problem why it wasn't writing to it's tile entity, so I gave you a thank you. However, I do believe that packet handling would be neccessary, so MineMarteen also helpedd solve this problem. The thing that solved it was I forgot to use the hasTileEntity(int meta) method in my block class. I'll experiment around with some stuff, let you know how the results turned out and if the block successfully reads the stored nbt.

 

Here is some code explained

 

I used a double object to store the height value in the tile entity class so I can call the .toString() method in the GuiGravityLift class. I didn't know you could do that with a primitive.

 

I intend to use the same tile entity for the gravity lift block, so saying which other tile entities I am using isn't neccessary

 

I do know java, quite well actually, but not fully how Minecraft and Forge works.

 

Thanks so much for your help, and MineMarteen's help with the packet handling

Link to comment
Share on other sites

I used a double object to store the height value in the tile entity class so I can call the .toString() method in the GuiGravityLift class. I didn't know you could do that with a primitive.

 

I intend to use the same tile entity for the gravity lift block, so saying which other tile entities I am using isn't neccessary

 

I do know java, quite well actually, but not fully how Minecraft and Forge works.

my tips were PURELLY informationnal btw, you are free to do wtv u want with them :P

 

and yes you are still required to send the change to the server because if you don't the server (the guy that decide everything) doesnt know that the TE values have changed

 

i beleive my 2 tutorial will help you :)

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

I try to use the packet to send a message to the server to change it's tile entity when the buttons of the gui are clicked, but it crashes with a protocol exception when I try. I know I coded it to do this, but it was in the tutorial with advanced packet handling.

 

How would you suggest I send a packet to the server with the x y z coordinates when I click a button on the gui?

Link to comment
Share on other sites

well for 1 i suggest you use the packet read/write class i made, they are in this tutorial at the every begining

 

http://www.minecraftforge.net/wiki/Organising_packet_handlers

 

they make code much clearer

 

basicly all you have to do is

PacketWriteStream stream = new PacketWriteStream();

stream.put(tileEntityX);

stream.put(tileEntityY);

stream.put(tileEntityZ);

stream.put(height);

Packet p = stream.makePacket("channel");

 

PacketDispatcher.sendPacketToServer(p);

 

and server side:

 

PacketReadStream stream = new PacketReadStream(originalPacket);

int x = stream.readInt();

int y = stream.readInt();

int z = stream.readInt();

double height = stream.readDouble();

 

and then somethign like

World world = //get a world reference

world.getTileEntityAt(x, y, z).setHeight(height);

 

sry i gtg IRL gl (ill be there later so post question if you still need some help)

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

I have made the PacketOutputStream and the PacketInputStream, but I don't understand where I should put the rest. Where should I declare a new PacketWriteStream object and put the tileEntity x, y, and z coordinates in it? Do I declare it in the gui file, or the PacketHandler file?

Link to comment
Share on other sites

Actually, I found that it is much easier just to use a packet already used in Minecraft, in this case, I use the Packet132TileEntityData packet since that is all I need, and I found it actually saves data. Thanks for the help everyone has given me.

Link to comment
Share on other sites

Packet132TileEntityData cannot be sent to server without causing the server to kick the client, but it can be send from server to client, but thats basicly what the method markBlockForUpdate do

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

In that case, what do you think I should do? How do you propose I implement the packet sending code.

 

Here is the files that I have changed

 

GuiGravityLift.java

package kris91268.lbd;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;

import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;

import cpw.mods.fml.common.network.PacketDispatcher;

import kris91268.lbd.Blocks.BlockGravityLift;
import kris91268.lbd.Packet.PacketBlockChange;
import kris91268.lbd.Tileentity.TileEntityGravityLift;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet132TileEntityData;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;

/**
* 
* @author Arbiter
*
*/
public class GuiGravityLift extends GuiContainer
{
private static final ResourceLocation texture = new ResourceLocation("lbd:textures/gui/gravlift.png");
private GuiButton dnButton;
private GuiButton decByPointZeroOne;
private GuiButton decByPointOne;
private GuiButton incByPointOne;
private GuiButton incByOnePointZero;
private GuiTextField number;
public static String gravLiftHeight;
private TileEntityGravityLift tileEntity;

public GuiGravityLift(InventoryPlayer par1, TileEntityGravityLift par2)
{
	super(new ContainerGravityLift(par1, par2));
	tileEntity = par2;
}
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
	fontRenderer.drawString("Gravity Lift", 8, 6, 4210752);
	fontRenderer.drawString("Inventory", 8, ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
	this.mc.func_110434_K().func_110577_a(texture);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	int x = (width - xSize) / 2;
	int y = (height - ySize) / 2;
	this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
	this.number.drawTextBox();
}
@Override
public void initGui()
{
	super.initGui();
	Keyboard.enableRepeatEvents(true);
	this.buttonList.add(this.dnButton = new GuiButton(0, this.width / 2 - 25, this.height / 4 + 35, 50, 20, "Done"));
	this.buttonList.add(this.decByPointZeroOne = new GuiButton(1, this.width / 2 - 75, this.height / 4 + 0, 40, 20, "-0.1"));
	this.buttonList.add(this.decByPointOne = new GuiButton(2, this.width / 2 - 75, this.height / 4 + 25, 40, 20, "-1.0"));
	this.buttonList.add(this.incByPointOne = new GuiButton(3, this.width / 2 + 25, this.height / 4 + 0, 40, 20, "+0.1"));
	this.buttonList.add(this.incByOnePointZero = new GuiButton(4, this.width / 2 + 25, this.height / 4 + 25, 40, 20, "+1.0"));
	this.number = new GuiTextField(this.fontRenderer, this.width / 2 - 20, this.height / 4 + 1, 40, 20);
	this.number.setVisible(true);
	this.number.setCanLoseFocus(false);
	this.number.setFocused(true);
	if (tileEntity.height == null)
	{
		tileEntity.height = 0.0D;
		this.number.setText(tileEntity.height.toString());
		gravLiftHeight = tileEntity.height.toString();
	}
	else
	{
		this.number.setText(tileEntity.height.toString());
		gravLiftHeight = tileEntity.height.toString();
	}
}
public void onGuiClosed()
{
	Keyboard.enableRepeatEvents(false);
	Double theNumber = Double.parseDouble(gravLiftHeight);
	tileEntity.bindHeightToTileEntity(theNumber);
	String s = "gravlift";
	ByteArrayOutputStream out = new ByteArrayOutputStream();
	DataOutputStream dataOut = new DataOutputStream(out);
	try
	{
		dataOut.writeDouble(theNumber);
		this.mc.getNetHandler().addToSendQueue(new Packet250CustomPayload(s, out.toByteArray()));
		this.tileEntity.getDescriptionPacket();
		this.tileEntity.bindHeightToTileEntity(theNumber);
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
}
public boolean isAboveZero(String par1Str)
{
	Double theDouble = Double.parseDouble(par1Str);
	return theDouble >= 0.00 ? true : false;
}
public boolean isBelowFive(String par1Str)
{
	Double theDouble = Double.parseDouble(par1Str);
	return theDouble <= 5.00 ? true : false;
}
public void updateScreen()
{
	this.number.updateCursorCounter();
}
/**
public void mouseClicked(int par1, int par2, int par3)
{
	super.mouseClicked(par1, par2, par3);
	this.number.mouseClicked(par1, par2, par3);
}
public void keyTyped(char par1, int par2)
{
	this.number.textboxKeyTyped(par1, par2);
	((GuiButton)this.buttonList.get(0)).enabled = this.number.getText().trim().length() > 0;
	if (par2 == 28 || par2 == 156)
	{
		this.actionPerformed((GuiButton)this.buttonList.get(0));
	}
}**/
@Override
protected void actionPerformed(GuiButton guiButton)
{
	int x = tileEntity.xCoord;
	int y = tileEntity.yCoord;
	int z = tileEntity.zCoord;
	switch (guiButton.id)
	{
	case 0:
		this.mc.displayGuiScreen((GuiScreen)null);
		break;
	case 1:
		Double heightInDoubles = Double.parseDouble(gravLiftHeight);
		if (heightInDoubles != 0.0)
		{
			heightInDoubles -= 0.1;
		}
		gravLiftHeight = heightInDoubles.toString();
		number.setText(gravLiftHeight);
		PacketDispatcher.sendPacketToServer(new PacketBlockChange(heightInDoubles, tileEntity, x, y, z).makePacket());
		break;
	case 2:
		Double heightInDoubles1 = Double.parseDouble(gravLiftHeight);
		if (heightInDoubles1 < 1.0)
		{
			heightInDoubles1 = 0.0;
		}
		else
		{
			heightInDoubles1 -= 1.0;
		}
		gravLiftHeight = heightInDoubles1.toString();
		number.setText(gravLiftHeight);
		PacketDispatcher.sendPacketToServer(new PacketBlockChange(heightInDoubles1, tileEntity, x, y, z).makePacket());
		break;
	case 3:
		Double theHeight = Double.parseDouble(gravLiftHeight);
		if (theHeight != 5.0)
		{
			theHeight += 0.1;
		}
		gravLiftHeight = theHeight.toString();
		number.setText(gravLiftHeight);
		tileEntity.bindHeightToTileEntity(theHeight);
		PacketDispatcher.sendPacketToServer(new PacketBlockChange(theHeight, tileEntity, x, y, z).makePacket());
		break;
	case 4:
		Double theNumber = Double.parseDouble(gravLiftHeight);
		if (theNumber > 4.0)
		{
			theNumber = 5.0;
		}
		else
		{
			theNumber += 1.0;
		}
		gravLiftHeight = theNumber.toString();
		number.setText(gravLiftHeight);
		String s = "gravlift";
		ByteArrayOutputStream out = new ByteArrayOutputStream();
		DataOutputStream dataOut = new DataOutputStream(out);
		try
		{
			dataOut.writeDouble(theNumber);
			this.mc.getNetHandler().addToSendQueue(new Packet250CustomPayload(s, out.toByteArray()));
			tileEntity.getDescriptionPacket();
			this.tileEntity.bindHeightToTileEntity(theNumber);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		default:
			break;
	}
}
}

 

TileEntityGravityLift.java

package kris91268.lbd.Tileentity;

import java.awt.List;

import kris91268.lbd.Blocks.BlockGravityLift;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagDouble;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet132TileEntityData;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

/**
* 
* @author Arbiter
*
*/
public class TileEntityGravityLift extends TileEntity implements IInventory
{
private String aString;
public Double height;		

public void readFromNBT(NBTTagCompound par1NBTTagCompound)
{
	super.readFromNBT(par1NBTTagCompound);
	height = par1NBTTagCompound.getDouble("height");
	System.out.println(height);
}
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
{
	super.writeToNBT(par1NBTTagCompound);
	par1NBTTagCompound.setDouble("height", height);
	System.out.println(height);
}
public boolean isUsableByPlayer(EntityPlayer par1EntityPlayer)
{
	return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : 
		par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
}
public void something(String par1Str)
{
	this.aString = par1Str;
}
@Override
public String getInvName()
{
	return "Gravity Lift";
}
public void bindHeightToTileEntity(double theHeight)
{
	this.height = theHeight;
	worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
public double getHeightLevel()
{
	return this.height; 
}
public Packet getDescriptionPacket()
{
	NBTTagCompound nbt = new NBTTagCompound();
	this.writeToNBT(nbt);
	return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 3, nbt);
}
@Override
public int getSizeInventory()
{		
	return 0;
}
@Override
public ItemStack getStackInSlot(int i) 
{
	return null;
}
@Override
public ItemStack decrStackSize(int i, int j)
{
	return null;
}
@Override
public ItemStack getStackInSlotOnClosing(int i)
{
	return null;
}
@Override
public void setInventorySlotContents(int i, ItemStack itemstack)
{

}
@Override
public boolean isInvNameLocalized()
{
	return false;
}
@Override
public int getInventoryStackLimit()
{
	return 64;
}
@Override
public boolean isUseableByPlayer(EntityPlayer entityplayer)
{
	return true;
}
@Override
public void openChest()
{

}
@Override
public void closeChest()
{

}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)
{
	return false;
}
}

Link to comment
Share on other sites

public Packet getDescriptionPacket()
{
	NBTTagCompound nbt = new NBTTagCompound();
	this.writeToNBT(nbt);
	return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 3, nbt);
}

This is the packet that will be sent when world.markBlockForUpdate(...) is called.

If you want to manage the receiving part of this packet, you can change it into a Packet250CustomPayload, add extra data, and send it through your channel.

Actually, you should change it. A Packet132TileEntityData with type 3 is assumed to come from a TileEntityBeacon.

Link to comment
Share on other sites

public Packet getDescriptionPacket()
{
	NBTTagCompound nbt = new NBTTagCompound();
	this.writeToNBT(nbt);
	return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 3, nbt);
}

This is the packet that will be sent when world.markBlockForUpdate(...) is called.

If you want to manage the receiving part of this packet, you can change it into a Packet250CustomPayload, add extra data, and send it through your channel.

Actually, you should change it. A Packet132TileEntityData with type 3 is assumed to come from a TileEntityBeacon.

 

no actually that's wrong, more then 1 tile entity in the game use it

 

beacon, command block, mob spawner and skull

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

no actually that's wrong, more then 1 tile entity in the game use it

 

beacon, command block, mob spawner and skull

Only with types being respectively, 3, 2, 1 and 4.

 

You can use whatever packet type indeed, but in this case, the tileentity needs to override like this:

@Override
onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
{
         this.readFromNBT(pkt.customParam1);
}

Link to comment
Share on other sites

I have been doing some work and following the Packet handling tutorial again, and I have successfully sended a packet to the tile entity, and it writes to it's nbt. That is all solved. However, when I collide with the block, it doesn't get the set height for the specific tile entity. How would I retrieve this for use in the block class. Here is the changed files

 

GuiGravityLift.java

package kris91268.lbd;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.relauncher.Side;
import kris91268.lbd.Blocks.BlockGravityLift;
import kris91268.lbd.Packet.PacketBlockChange;
import kris91268.lbd.Tileentity.TileEntityGravityLift;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet132TileEntityData;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;

/**
* 
* @author Arbiter
*
*/
public class GuiGravityLift extends GuiContainer
{
private static final ResourceLocation texture = new ResourceLocation("lbd:textures/gui/gravlift.png");
private GuiButton dnButton;
private GuiButton decByPointZeroOne;
private GuiButton decByPointOne;
private GuiButton incByPointOne;
private GuiButton incByOnePointZero;
private GuiTextField number;
public static String gravLiftHeight;
private TileEntityGravityLift tileEntity;
public EntityPlayer player;

public GuiGravityLift(InventoryPlayer par1, TileEntityGravityLift par2, EntityPlayer player)
{
	super(new ContainerGravityLift(par1, par2));
	tileEntity = par2;
	this.player = player;
}
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
	fontRenderer.drawString("Gravity Lift", 8, 6, 4210752);
	fontRenderer.drawString("Inventory", 8, ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
	this.mc.func_110434_K().func_110577_a(texture);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	int x = (width - xSize) / 2;
	int y = (height - ySize) / 2;
	this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
	this.number.drawTextBox();
}
@Override
public void initGui()
{
	super.initGui();
	Keyboard.enableRepeatEvents(true);
	this.buttonList.add(this.dnButton = new GuiButton(0, this.width / 2 - 25, this.height / 4 + 35, 50, 20, "Done"));
	this.buttonList.add(this.decByPointZeroOne = new GuiButton(1, this.width / 2 - 75, this.height / 4 + 0, 40, 20, "-0.1"));
	this.buttonList.add(this.decByPointOne = new GuiButton(2, this.width / 2 - 75, this.height / 4 + 25, 40, 20, "-1.0"));
	this.buttonList.add(this.incByPointOne = new GuiButton(3, this.width / 2 + 25, this.height / 4 + 0, 40, 20, "+0.1"));
	this.buttonList.add(this.incByOnePointZero = new GuiButton(4, this.width / 2 + 25, this.height / 4 + 25, 40, 20, "+1.0"));
	this.number = new GuiTextField(this.fontRenderer, this.width / 2 - 20, this.height / 4 + 1, 40, 20);
	this.number.setVisible(true);
	this.number.setCanLoseFocus(false);
	this.number.setFocused(true);
	this.number.setText(tileEntity.height.toString());
	gravLiftHeight = tileEntity.height.toString();
}
public void onGuiClosed()
{
	Keyboard.enableRepeatEvents(false);
	Double theNumber = Double.parseDouble(gravLiftHeight);
}
public boolean isAboveZero(String par1Str)
{
	Double theDouble = Double.parseDouble(par1Str);
	return theDouble >= 0.00 ? true : false;
}
public boolean isBelowFive(String par1Str)
{
	Double theDouble = Double.parseDouble(par1Str);
	return theDouble <= 5.00 ? true : false;
}
public void updateScreen()
{
	this.number.updateCursorCounter();
}
/**
public void mouseClicked(int par1, int par2, int par3)
{
	super.mouseClicked(par1, par2, par3);
	this.number.mouseClicked(par1, par2, par3);
}
public void keyTyped(char par1, int par2)
{
	this.number.textboxKeyTyped(par1, par2);
	((GuiButton)this.buttonList.get(0)).enabled = this.number.getText().trim().length() > 0;
	if (par2 == 28 || par2 == 156)
	{
		this.actionPerformed((GuiButton)this.buttonList.get(0));
	}
}**/
@Override
protected void actionPerformed(GuiButton guiButton)
{
	int x = tileEntity.xCoord;
	int y = tileEntity.yCoord;
	int z = tileEntity.zCoord;
	switch (guiButton.id)
	{
	case 0:
		this.mc.displayGuiScreen((GuiScreen)null);
		break;
	case 1:
		Double heightInDoubles = Double.parseDouble(gravLiftHeight);
		if (heightInDoubles != 0.0)
		{
			heightInDoubles -= 0.1;
		}
		gravLiftHeight = heightInDoubles.toString();
		number.setText(gravLiftHeight);
		PacketDispatcher.sendPacketToServer(new PacketBlockChange(heightInDoubles, tileEntity, x, y, z).makePacket());
		break;
	case 2:
		Double heightInDoubles1 = Double.parseDouble(gravLiftHeight);
		if (heightInDoubles1 < 1.0)
		{
			heightInDoubles1 = 0.0;
		}
		else
		{
			heightInDoubles1 -= 1.0;
		}
		gravLiftHeight = heightInDoubles1.toString();
		number.setText(gravLiftHeight);
		PacketDispatcher.sendPacketToServer(new PacketBlockChange(heightInDoubles1, tileEntity, x, y, z).makePacket());
		break;
	case 3:
		Double theHeight = Double.parseDouble(gravLiftHeight);
		if (theHeight != 5.0)
		{
			theHeight += 0.1;
		}
		gravLiftHeight = theHeight.toString();
		number.setText(gravLiftHeight);
		tileEntity.bindHeightToTileEntity(theHeight);
		PacketDispatcher.sendPacketToServer(new PacketBlockChange(theHeight, tileEntity, x, y, z).makePacket());
		break;
	case 4:
		Double theNumber = Double.parseDouble(gravLiftHeight);
		if (theNumber > 4.0)
		{
			theNumber = 5.0;
		}
		else
		{
			theNumber += 1.0;
		}
		gravLiftHeight = theNumber.toString();
		number.setText(gravLiftHeight);
		ByteArrayOutputStream outputStream = new ByteArrayOutputStream(;
		DataOutputStream dataStream = new DataOutputStream(outputStream);
		try
		{
			dataStream.writeDouble(theNumber);
			dataStream.writeInt(tileEntity.xCoord);
			dataStream.writeInt(tileEntity.yCoord);
			dataStream.writeInt(tileEntity.zCoord);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		Packet250CustomPayload packet = new Packet250CustomPayload();
		packet.channel = "lbd";
		packet.data = outputStream.toByteArray();
		packet.length = outputStream.size();
		Side side = FMLCommonHandler.instance().getEffectiveSide();
		if (side == Side.SERVER)
		{
			EntityPlayerMP playerMP = (EntityPlayerMP)player;
		}
		else if (side == Side.CLIENT)
		{
			EntityClientPlayerMP clientPlayer = (EntityClientPlayerMP)player;
			clientPlayer.sendQueue.addToSendQueue(packet);
		}
		default:
			break;
	}
}
}

 

GuiGravityLiftHandler.java

package kris91268.lbd;

import kris91268.lbd.Tileentity.TileEntityGravityLift;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;

/**
* 
* @author Arbiter
*
*/
public class GuiGravLiftHandler implements IGuiHandler
{
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
	TileEntityGravityLift tileEntity = (TileEntityGravityLift)world.getBlockTileEntity(x, y, z);
	return new ContainerGravityLift(player.inventory, tileEntity);
}
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
	TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
	return tileEntity instanceof TileEntityGravityLift ? new GuiGravityLift(player.inventory, (TileEntityGravityLift)tileEntity, player) : null;
}
}

 

TileEntityGravityLift.java

package kris91268.lbd.Tileentity;

import java.awt.List;

import kris91268.lbd.Blocks.BlockGravityLift;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagDouble;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet132TileEntityData;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

/**
* 
* @author Arbiter
*
*/
public class TileEntityGravityLift extends TileEntity implements IInventory
{
private String aString;
public Double height = new Double(0.0D);			

public void readFromNBT(NBTTagCompound par1NBTTagCompound)
{
	super.readFromNBT(par1NBTTagCompound);
	height = par1NBTTagCompound.getDouble("height");
	System.out.println(height);
}
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
{
	super.writeToNBT(par1NBTTagCompound);
	par1NBTTagCompound.setDouble("height", height);
	System.out.println(height);
}
public boolean isUsableByPlayer(EntityPlayer par1EntityPlayer)
{
	return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : 
		par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
}
public void something(String par1Str)
{
	this.aString = par1Str;
}
@Override
public String getInvName()
{
	return "Gravity Lift";
}
public void bindHeightToTileEntity(double theHeight)
{
	this.height = theHeight;
	worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
public double getHeightLevel()
{
	return height; 
}
public Packet getDescriptionPacket()
{
	NBTTagCompound nbt = new NBTTagCompound();
	this.writeToNBT(nbt);
	return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 3, nbt);
}
@Override
public int getSizeInventory()
{		
	return 0;
}
@Override
public ItemStack getStackInSlot(int i) 
{
	return null;
}
@Override
public ItemStack decrStackSize(int i, int j)
{
	return null;
}
@Override
public ItemStack getStackInSlotOnClosing(int i)
{
	return null;
}
@Override
public void setInventorySlotContents(int i, ItemStack itemstack)
{

}
@Override
public boolean isInvNameLocalized()
{
	return false;
}
@Override
public int getInventoryStackLimit()
{
	return 64;
}
@Override
public boolean isUseableByPlayer(EntityPlayer entityplayer)
{
	return true;
}
@Override
public void openChest()
{

}
@Override
public void closeChest()
{

}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)
{
	return false;
}
}

 

BlockGravityLift.jaca

package kris91268.lbd.Blocks;

import java.util.Random;
import kris91268.lbd.GuiGravityLift;
import kris91268.lbd.ModLBD;
import kris91268.lbd.Tileentity.TileEntityGravityLift;
import cpw.mods.fml.common.registry.BlockProxy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;

/**
* 
* @author Arbiter
*
*/
public class BlockGravityLift extends BlockContainer implements BlockProxy
{
public Class theTileEntityClass;

public BlockGravityLift(int par1, Class<? extends TileEntity> entityClass)
{
	super(par1, Material.iron);
	theTileEntityClass = entityClass;
	setHardness(1.5F);
	setResistance(1.0F);
	setStepSound(Block.soundMetalFootstep);
	setUnlocalizedName("lbd:gravityLift");
	func_111022_d("lbd:gravityLift");
	setCreativeTab(CreativeTabs.tabRedstone);
	setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3F, 1.0F);
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
	par5Entity.fallDistance = 0.0F;
	TileEntityGravityLift tileEntity = (TileEntityGravityLift)par1World.getBlockTileEntity(par2, par3, par4);
	double height = tileEntity.getHeightLevel();
	if (height <= 0.0D)
	{
		return;
	}
	if (par1World.isRemote)
	{
		if (par5Entity instanceof EntityPlayer)
		{
			par5Entity.setVelocity(0.0D, height / 2, 0.0D);
			par5Entity.moveEntity(0.0D, height, 0.0D);
		}
	}
	else
	{
		if (par5Entity instanceof EntityPlayerMP)
		{
			par5Entity.addVelocity(0.0D, height / 2, 0.0D);
			par5Entity.moveEntity(0.0D, height, 0.0D);
		}
	}
}
@Override
public void onBlockAdded(World par1World, int par2, int par3, int par4)
{
	super.onBlockAdded(par1World, par2, par3, par4);
	par1World.setBlockTileEntity(par2, par3, par4, new TileEntityGravityLift());
}
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer player, int metadata, float par7, float par8, float par9)
{
    if (!par1World.isRemote)
    {
    	TileEntityGravityLift tileEntity = (TileEntityGravityLift)par1World.getBlockTileEntity(par2, par3, par4);
    	if (tileEntity != null)
    	{
    		player.openGui(ModLBD.instance, 0, par1World, par2, par3, par4);
    	}
    }
    return true;
}
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
	double d0 = (double)((float)par2 + 0.5F);
	double d1 = (double)((float)par3 + 0.3F);
	double d2 = (double)((float)par4 + 0.5F);
	par1World.spawnParticle("portal", d0, d1, d2, 0.0D, 0.0D, 0.0D);
}
public boolean isOpaqueCube()
{
	return false;
}
public boolean renderAsNormalBlock()
{
	return false;
}
public int getRenderType()
{
	return -1;
}
@Override
public boolean hasTileEntity(int par1)
{
	return true;
}
public TileEntity createNewTileEntity(World par1World)
{
	try
	{
		return new TileEntityGravityLift();
	}
	catch (Exception e)
	{
		System.out.println("Error creating a new tile entity");
		return null;
	}
}
}

 

PacketHandler.java

package kris91268.lbd.Packet;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.util.logging.Logger;

import kris91268.lbd.Packet.PacketBase.ProtocolException;
import kris91268.lbd.Tileentity.TileEntityGravityLift;

import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;

/**
* 
* @author Arbiter
*
*/
public class PacketHandler implements IPacketHandler
{
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
{
	if (packet.channel.equals("lbd"))
	{
		handleHeight(packet, player);
	}
}
private void handleHeight(Packet250CustomPayload packet, Player player)
{
	DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data));
	double height;
	int x; 
	int y;
	int z;
	try
	{
		height = inputStream.readDouble();
		x = inputStream.readInt();
		y = inputStream.readInt();
		z = inputStream.readInt();
	}
	catch (IOException e)
	{
		e.printStackTrace();
		return;
	}
	EntityPlayer entityPlayer = (EntityPlayer)player;
	TileEntityGravityLift tileEntity = (TileEntityGravityLift)entityPlayer.worldObj.getBlockTileEntity(x, y, z);
	tileEntity.bindHeightToTileEntity(height);
}
}

Link to comment
Share on other sites

did you check that server really has the right value ?

 

i dont think you need to, but its always a good thing to resync from server to client

 

entityPlayer.worldObj.markBlockForUpdate(x, y, z); // or similar name

 

call this inside your packet handler AFTER youve made the changes to your TE

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

  • 2 weeks later...

OK, I have been doing some testing with other entities, and they seem to launch fine, even with different height settings set on the grav lift, its like it seems to work for everything, but the player. Why is this? (I have removed the code about the par5Entity instanceof EntityPlayer, e.t.c and just placed the methods to propel entites in the air).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello. I've been having a problem when launching minecraft forge. It just doesn't open the game, and leaves me with this "(exit code 1)" error. Both regular and optifine versions of minecraft launch just fine, tried both with 1.18.2 and 1.20.1. I can assure that my drivers are updated so that can't be it, and i've tried using Java 17, 18 and 21 to no avail. Even with no mods installed, the thing won't launch. I'll leave the log here, although it's in spanish: https://jmp.sh/s/FPqGBSi30fzKJDt2M1gc My specs are this: Ryzen 3 4100 || Radeon R9 280x || 16gb ram || Windows 10 I'd appreciate any help, thank you in advance.
    • Hey, Me and my friends decided to start up a Server with "a few" mods, the last few days everything went well we used all the items we wanted. Now our Game crashes the moment we touch a Lava Bucket inside our Inventory. It just instantly closes and gives me an "Alc Cleanup"  Crash screen (Using GDLauncher). I honestly dont have a clue how to resolve this error. If anyone could help id really appreciate it, I speak German and Englisch so you can choose whatever you speak more fluently. Thanks in Advance. Plus I dont know how to link my Crash Report help for that would be nice too whoops
    • I hosted a minecraft server and I modded it, and there is always an error on the console which closes the server. If someone knows how to repair it, it would be amazing. Thank you. I paste the crash report down here: ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)   AstralCore (astralsorcery-1.12.2-1.10.27.jar)   CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)   SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   midnight (themidnight-0.3.5.jar)   FutureMC (Future-MC-0.2.19.jar)   SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)   Backpacked (backpacked-1.4.3-1.12.2.jar)   LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar) Contact their authors BEFORE contacting forge // There are four lights! Time: 3/28/24 12:17 PM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:89)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:612)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98)     at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333)     at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)     at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)     at java.lang.Class.privateGetPublicMethods(Class.java:2902)     at java.lang.Class.getMethods(Class.java:1615)     at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:82)     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82)     ... 31 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)     ... 37 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@4e558728 from coremod FMLCorePlugin     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)     at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)     ... 39 more Caused by: java.lang.RuntimeException: Attempted to load class bsb for invalid side SERVER     at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)     ... 41 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Linux (amd64) version 5.10.0-28-cloud-amd64     Java Version: 1.8.0_382, Temurin     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin     Memory: 948745536 bytes (904 MB) / 1564999680 bytes (1492 MB) up to 7635730432 bytes (7282 MB)     JVM Flags: 2 total; -Xmx8192M -Xms256M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2860 63 mods loaded, 63 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                 | Version                 | Source                                                | Signature                                |     |:----- |:------------------ |:----------------------- |:----------------------------------------------------- |:---------------------------------------- |     | LC    | minecraft          | 1.12.2                  | minecraft.jar                                         | None                                     |     | LC    | mcp                | 9.42                    | minecraft.jar                                         | None                                     |     | LC    | FML                | 8.0.99.99               | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge              | 14.23.5.2860            | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | creativecoredummy  | 1.0.0                   | minecraft.jar                                         | None                                     |     | LC    | backpacked         | 1.4.2                   | backpacked-1.4.3-1.12.2.jar                           | None                                     |     | LC    | itemblacklist      | 1.4.3                   | ItemBlacklist-1.4.3.jar                               | None                                     |     | LC    | securitycraft      | v1.9.8                  | [1.12.2] SecurityCraft v1.9.8.jar                     | None                                     |     | LC    | aiimprovements     | 0.0.1.3                 | AIImprovements-1.12-0.0.1b3.jar                       | None                                     |     | LC    | jei                | 4.16.1.301              | jei_1.12.2-4.16.1.301.jar                             | None                                     |     | LC    | appleskin          | 1.0.14                  | AppleSkin-mc1.12-1.0.14.jar                           | None                                     |     | LC    | baubles            | 1.5.2                   | Baubles-1.12-1.5.2.jar                                | None                                     |     | LC    | astralsorcery      | 1.10.27                 | astralsorcery-1.12.2-1.10.27.jar                      | a0f0b759d895c15ceb3e3bcb5f3c2db7c582edf0 |     | LC    | attributefix       | 1.0.12                  | AttributeFix-Forge-1.12.2-1.0.12.jar                  | None                                     |     | LC    | atum               | 2.0.20                  | Atum-1.12.2-2.0.20.jar                                | None                                     |     | LC    | bloodmoon          | 1.5.3                   | Bloodmoon-MC1.12.2-1.5.3.jar                          | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LC    | forgelin           | 1.8.4                   | Forgelin-1.8.4.jar                                    | None                                     |     | LC    | bountiful          | 2.2.2                   | Bountiful-2.2.2.jar                                   | None                                     |     | LC    | camera             | 1.0.10                  | camera-1.0.10.jar                                     | None                                     |     | LC    | chisel             | MC1.12.2-1.0.2.45       | Chisel-MC1.12.2-1.0.2.45.jar                          | None                                     |     | LC    | collective         | 3.0                     | collective-1.12.2-3.0.jar                             | None                                     |     | LC    | reskillable        | 1.12.2-1.13.0           | Reskillable-1.12.2-1.13.0.jar                         | None                                     |     | LC    | compatskills       | 1.12.2-1.17.0           | CompatSkills-1.12.2-1.17.0.jar                        | None                                     |     | LC    | creativecore       | 1.10.0                  | CreativeCore_v1.10.71_mc1.12.2.jar                    | None                                     |     | LC    | customnpcs         | 1.12                    | CustomNPCs_1.12.2-(05Jul20).jar                       | None                                     |     | LC    | darknesslib        | 1.1.2                   | DarknessLib-1.12.2-1.1.2.jar                          | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 |     | LC    | dungeonsmod        | @VERSION@               | DungeonsMod-1.12.2-1.0.8.jar                          | None                                     |     | LC    | enhancedvisuals    | 1.3.0                   | EnhancedVisuals_v1.4.4_mc1.12.2.jar                   | None                                     |     | LC    | extrautils2        | 1.0                     | extrautils2-1.12-1.9.9.jar                            | None                                     |     | LC    | futuremc           | 0.2.6                   | Future-MC-0.2.19.jar                                  | None                                     |     | LC    | geckolib3          | 3.0.30                  | geckolib-forge-1.12.2-3.0.31.jar                      | None                                     |     | LC    | gottschcore        | 1.15.1                  | GottschCore-mc1.12.2-f14.23.5.2859-v1.15.1.jar        | None                                     |     | LC    | hardcorerevival    | 1.2.0                   | HardcoreRevival_1.12.2-1.2.0.jar                      | None                                     |     | LC    | waila              | 1.8.26                  | Hwyla-1.8.26-B41_1.12.2.jar                           | None                                     |     | LE    | imsm               | 1.12                    | Instant Massive Structures Mod 1.12.2.jar             | None                                     |     | L     | journeymap         | 1.12.2-5.7.1p2          | journeymap-1.12.2-5.7.1p2.jar                         | None                                     |     | L     | mobsunscreen       | @version@               | mobsunscreen-1.12.2-3.1.5.jar                         | None                                     |     | L     | morpheus           | 1.12.2-3.5.106          | Morpheus-1.12.2-3.5.106.jar                           | None                                     |     | L     | llibrary           | 1.7.20                  | llibrary-1.7.20-1.12.2.jar                            | None                                     |     | L     | mowziesmobs        | 1.5.8                   | mowziesmobs-1.5.8.jar                                 | None                                     |     | L     | nocubessrparmory   | 3.0.0                   | NoCubes_SRP_Combat_Addon_3.0.0.jar                    | None                                     |     | L     | nocubessrpnests    | 3.0.0                   | NoCubes_SRP_Nests_Addon_3.0.0.jar                     | None                                     |     | L     | nocubessrpsurvival | 3.0.0                   | NoCubes_SRP_Survival_Addon_3.0.0.jar                  | None                                     |     | L     | nocubesrptweaks    | V4.1                    | nocubesrptweaks-V4.1.jar                              | None                                     |     | L     | patchouli          | 1.0-23.6                | Patchouli-1.0-23.6.jar                                | None                                     |     | L     | artifacts          | 1.1.2                   | RLArtifacts-1.1.2.jar                                 | None                                     |     | L     | rsgauges           | 1.2.8                   | rsgauges-1.12.2-1.2.8.jar                             | None                                     |     | L     | rustic             | 1.1.7                   | rustic-1.1.7.jar                                      | None                                     |     | L     | silentlib          | 3.0.13                  | SilentLib-1.12.2-3.0.14+168.jar                       | None                                     |     | L     | scalinghealth      | 1.3.37                  | ScalingHealth-1.12.2-1.3.42+147.jar                   | None                                     |     | L     | lteleporters       | 1.12.2-3.0.2            | simpleteleporters-1.12.2-3.0.2.jar                    | None                                     |     | L     | spartanshields     | 1.5.5                   | SpartanShields-1.12.2-1.5.5.jar                       | None                                     |     | L     | spartanweaponry    | 1.5.3                   | SpartanWeaponry-1.12.2-1.5.3.jar                      | None                                     |     | L     | srparasites        | 1.9.18                  | SRParasites-1.12.2v1.9.18.jar                         | None                                     |     | L     | treasure2          | 2.2.0                   | Treasure2-mc1.12.2-f14.23.5.2859-v2.2.1.jar           | None                                     |     | L     | treeharvester      | 4.0                     | treeharvester_1.12.2-4.0.jar                          | None                                     |     | L     | twilightforest     | 3.11.1021               | twilightforest-1.12.2-3.11.1021-universal.jar         | None                                     |     | L     | variedcommodities  | 1.12.2                  | VariedCommodities_1.12.2-(31Mar23).jar                | None                                     |     | L     | voicechat          | 1.12.2-2.4.32           | voicechat-forge-1.12.2-2.4.32.jar                     | None                                     |     | L     | wolfarmor          | 3.8.0                   | WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar | None                                     |     | L     | worldborder        | 2.3                     | worldborder_1.12.2-2.3.jar                            | None                                     |     | L     | midnight           | 0.3.5                   | themidnight-0.3.5.jar                                 | None                                     |     | L     | structurize        | 1.12.2-0.10.277-RELEASE | structurize-1.12.2-0.10.277-RELEASE.jar               | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)    AstralCore (astralsorcery-1.12.2-1.10.27.jar)    CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)    SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)    ForgelinPlugin (Forgelin-1.8.4.jar)    midnight (themidnight-0.3.5.jar)   com.mushroom.midnight.core.transformer.MidnightClassTransformer FutureMC (Future-MC-0.2.19.jar)   thedarkcolour.futuremc.asm.CoreTransformer SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)    Backpacked (backpacked-1.4.3-1.12.2.jar)   com.mrcrayfish.backpacked.asm.BackpackedTransformer LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   codersafterdark.reskillable.base.asm.ClassTransformer LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • When i add mods like falling leaves, visuality and kappas shaders, even if i restart Minecraft they dont show up in the mods menu and they dont work
    • Delete the forge-client.toml file in your config folder  
  • Topics

×
×
  • Create New...

Important Information

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