Jump to content

Recommended Posts

Posted

Heyo guys, I have started making a system for my blocks with connected textures to be configured (clicked with my chisel) to have the "mode" changed when clicked. These modes with either set it to connect to all blocks of it's same type with the same mode, or if in no connection mode, don't connect to any. I have this part down. My issue is, the mode int, which is stored in a tile entity is not syncing properly. I have

 @Override
    public Packet getDescriptionPacket() 
    {
    	NBTTagCompound nbt = new NBTTagCompound();
        writeToNBT(nbt);
        return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbt);
    }
    
    @Override
    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) 
    { 
        readFromNBT(pkt.func_148857_g());
        Minecraft.getMinecraft().renderGlobal.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
    } 

in my TE already. I can change the mode fine with right clicking with my chisel (I have a mod that let's me see tile's nbt in game), but the block with not change it's render unit the world is reloaded. Even when I place blocks next to it, it acts like it's mode never changed. When the game restarts, the changed you made to the mode would show up, but you would have to reload for any new changes to take affect. I am confused as to what my issue is. Here is my full TE:

 package com.jmanpenilla.carbonmod.common.tileentity;

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.tileentity.TileEntity;

import com.jmanpenilla.carbonmod.common.lib.Names;

public class TileConnectedTextureBlock extends TileEntity {

public static final int connect1 = 0;
public static final int connect2 = 1;
public static final int connect3 = 2;
public static final int connect4 = 3;
public static final int noConnect = 4;

private int mode;

public void readFromNBT(NBTTagCompound nbt) {
	super.readFromNBT(nbt);
	mode = nbt.getInteger(Names.NBT.connectedtexturemode);
}

public void writeToNBT(NBTTagCompound nbt) {
	super.writeToNBT(nbt);
	nbt.setInteger(Names.NBT.connectedtexturemode, mode);
	markDirty();
}

public int getMode() {
	return mode;
}

public void setMode(int mode) {
	this.mode = mode;
	markDirty();
}

@Override
    public Packet getDescriptionPacket() 
    {
    	NBTTagCompound nbt = new NBTTagCompound();
        writeToNBT(nbt);
        return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbt);
    }
    
    @Override
    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) 
    { 
        readFromNBT(pkt.func_148857_g());
        Minecraft.getMinecraft().renderGlobal.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
    }

}

and here is my full block class (If you use this for your connected textures purposes, please give me a bit of credit, it took a while to update to 1.7.2)

 package com.jmanpenilla.carbonmod.common.block;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

import com.jmanpenilla.carbonmod.common.creativetabs.TabCarbonMod;
import com.jmanpenilla.carbonmod.common.item.ModItems;
import com.jmanpenilla.carbonmod.common.lib.Reference;
import com.jmanpenilla.carbonmod.common.tileentity.TileConnectedTextureBlock;

public class ModBlockConnectedTextureSolid extends BlockContainer
{	
public IIcon[] textures = new IIcon[47];
public static int[] textureRefByID = 
{		
	0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1,
    13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19,
    15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27,
    14, 4, 4, 5, 5, 4, 4, 5, 5, 17, 17, 22, 26, 17, 17, 22, 26, 16, 16, 20,
    20, 16, 16, 28, 28, 21, 21, 46, 42, 21, 21, 43, 38, 4, 4, 5, 5, 4, 4,
    5, 5, 9, 9, 30, 12, 9, 9, 30, 12, 16, 16, 20, 20, 16, 16, 28, 28, 25,
    25, 45, 37, 25, 25, 40, 32, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3,
    19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 0, 0,
    6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13,
    13, 2, 2, 23, 31, 2, 2, 27, 14, 4, 4, 5, 5, 4, 4, 5, 5, 17, 17, 22, 26,
    17, 17, 22, 26, 7, 7, 24, 24, 7, 7, 10, 10, 29, 29, 44, 41, 29, 29, 39,
    33, 4, 4, 5, 5, 4, 4, 5, 5, 9, 9, 30, 12, 9, 9, 30, 12, 7, 7, 24, 24,
    7, 7, 10, 10, 8, 8, 36, 35, 8, 8, 34, 11 
};

    protected String folder;

    public ModBlockConnectedTextureSolid(Material material, String location)
    {
        super(material);
        this.stepSound = soundTypeStone;
        folder = location;
        setHardness(0.3F);
        this.setCreativeTab(TabCarbonMod.tabCarbonMod);
    }
    
    @Override
    public void registerBlockIcons(IIconRegister iconRegistry)
    {
    	for (int i = 0; i < 47; i++) {
    		textures[i] = iconRegistry.registerIcon(Reference.MOD_ID + ":ct/" + folder + "/" + (i+1));
    		//System.out.println(Reference.MOD_ID + ":ct/" + folder + "/" + (i+1));
    	}
    }

    private boolean shouldConnect(Block cBlock) {
    	if(this == ModBlocks.compressedcarbonBlock && Reference.bricksConnectToBlocks) {
    		if(cBlock == ModBlocks.compressedcarbonBlock || cBlock == ModBlocks.compressedcarbonBrick) {
    			return true;
    		}
    	}
    	else if(this == ModBlocks.refinedBluchoriditeBlock && Reference.bricksConnectToBlocks) {
    		if(cBlock == ModBlocks.refinedBluchoriditeBlock || cBlock == ModBlocks.refinedBluchoriditeBrick) {
    			return true;
    		}
    	}
    	else {
    		return cBlock == this;
    	}
    	
    	return false;
    }
    
    public boolean shouldConnectToBlock(IBlockAccess w, int cx, int cy, int cz, int x, int y, int z) {
    	Block cBlock = w.getBlock(cx, cy, cz);
    	TileConnectedTextureBlock cTile = null;
    	TileConnectedTextureBlock tTile = (TileConnectedTextureBlock) w.getTileEntity(x, y, z);
    	if(w.getTileEntity(cx, cy, cz) != null) {
    		cTile = (TileConnectedTextureBlock) w.getTileEntity(cx, cy, cz);
    	} 	
    	    	
    	if(cTile != null && cTile.getMode() == tTile.getMode()) {
    		return shouldConnect(cBlock);
    	}
    	
    	System.out.println(tTile.getMode());
    	
	return false;   	
    }
    
    @Override
    public IIcon getIcon(IBlockAccess w, int x, int y, int z, int side)
    {
	boolean[] bitMatrix = new boolean[8];

	switch (side) {
		case 0:
			bitMatrix[0] = shouldConnectToBlock(w, x-1, y, z-1, x, y, z);
	        bitMatrix[1] = shouldConnectToBlock(w, x, y, z-1, x, y, z);
	        bitMatrix[2] = shouldConnectToBlock(w, x+1, y, z-1, x, y, z);
	        bitMatrix[3] = shouldConnectToBlock(w, x-1, y, z, x, y, z);
	        bitMatrix[4] = shouldConnectToBlock(w, x+1, y, z, x, y, z);
	        bitMatrix[5] = shouldConnectToBlock(w, x-1, y, z+1, x, y, z);
	        bitMatrix[6] = shouldConnectToBlock(w, x, y, z+1, x, y, z);
	        bitMatrix[7] = shouldConnectToBlock(w, x+1, y, z+1, x, y, z);
	 		break;
	 	case 1:
	 		bitMatrix[0] = shouldConnectToBlock(w, x-1, y, z-1, x, y, z);
	        bitMatrix[1] = shouldConnectToBlock(w, x, y, z-1, x, y, z);
	        bitMatrix[2] = shouldConnectToBlock(w, x+1, y, z-1, x, y, z);
	        bitMatrix[3] = shouldConnectToBlock(w, x-1, y, z, x, y, z);
	        bitMatrix[4] = shouldConnectToBlock(w, x+1, y, z, x, y, z);
	        bitMatrix[5] = shouldConnectToBlock(w, x-1, y, z+1, x, y, z);
	        bitMatrix[6] = shouldConnectToBlock(w, x, y, z+1, x, y, z);
	        bitMatrix[7] = shouldConnectToBlock(w, x+1, y, z+1, x, y, z);
	 		break;
	 	case 2:
	 		bitMatrix[0] = shouldConnectToBlock(w, x+(side==3?1:-1), y+1, z, x, y, z);
	        bitMatrix[1] = shouldConnectToBlock(w, x, y+1, z, x, y, z);
	        bitMatrix[2] = shouldConnectToBlock(w, x+(side==2?1:-1), y+1, z, x, y, z);
	        bitMatrix[3] = shouldConnectToBlock(w, x+(side==3?1:-1), y, z, x, y, z);
	        bitMatrix[4] = shouldConnectToBlock(w, x+(side==2?1:-1), y, z, x, y, z);
	        bitMatrix[5] = shouldConnectToBlock(w, x+(side==3?1:-1), y-1, z, x, y, z);
	        bitMatrix[6] = shouldConnectToBlock(w, x, y-1, z, x, y, z);
	        bitMatrix[7] = shouldConnectToBlock(w, x+(side==2?1:-1), y-1, z, x, y, z);
	 		break;
	 	case 3:
	 		bitMatrix[0] = shouldConnectToBlock(w, x+(side==2?1:-1), y+1, z, x, y, z);
	        bitMatrix[1] = shouldConnectToBlock(w, x, y+1, z, x, y, z);
	        bitMatrix[2] = shouldConnectToBlock(w, x+(side==3?1:-1), y+1, z, x, y, z);
	        bitMatrix[3] = shouldConnectToBlock(w, x+(side==2?1:-1), y, z, x, y, z);
	        bitMatrix[4] = shouldConnectToBlock(w, x+(side==3?1:-1), y, z, x, y, z);
	        bitMatrix[5] = shouldConnectToBlock(w, x+(side==2?1:-1), y-1, z, x, y, z);
	        bitMatrix[6] = shouldConnectToBlock(w, x, y-1, z, x, y, z);
	        bitMatrix[7] = shouldConnectToBlock(w, x+(side==3?1:-1), y-1, z, x, y, z);
	 		break;
	 	case 4:
	 		bitMatrix[0] = shouldConnectToBlock(w, x, y+1, z+(side==5?1:-1), x, y, z);
	        bitMatrix[1] = shouldConnectToBlock(w, x, y+1, z, x, y, z);
	        bitMatrix[2] = shouldConnectToBlock(w, x, y+1, z+(side==4?1:-1), x, y, z);
	        bitMatrix[3] = shouldConnectToBlock(w, x, y, z+(side==5?1:-1), x, y, z);
	        bitMatrix[4] = shouldConnectToBlock(w, x, y, z+(side==4?1:-1), x, y, z);
	        bitMatrix[5] = shouldConnectToBlock(w, x, y-1, z+(side==5?1:-1), x, y, z);
	        bitMatrix[6] = shouldConnectToBlock(w, x, y-1, z, x, y, z);
	        bitMatrix[7] = shouldConnectToBlock(w, x, y-1, z+(side==4?1:-1), x, y, z);
	 		break;
	 	case 5:
	 		bitMatrix[0] = shouldConnectToBlock(w, x, y+1, z+(side==4?1:-1), x, y, z);
	        bitMatrix[1] = shouldConnectToBlock(w, x, y+1, z, x, y, z);
	        bitMatrix[2] = shouldConnectToBlock(w, x, y+1, z+(side==5?1:-1), x, y, z);
	        bitMatrix[3] = shouldConnectToBlock(w, x, y, z+(side==4?1:-1), x, y, z);
	        bitMatrix[4] = shouldConnectToBlock(w, x, y, z+(side==5?1:-1), x, y, z);
	        bitMatrix[5] = shouldConnectToBlock(w, x, y-1, z+(side==4?1:-1), x, y, z);
	        bitMatrix[6] = shouldConnectToBlock(w, x, y-1, z, x, y, z);
	        bitMatrix[7] = shouldConnectToBlock(w, x, y-1, z+(side==5?1:-1), x, y, z);
	 		break;
	}
	        
        int idBuilder = 0;

        for (int i = 0; i <= 7; i++) idBuilder = idBuilder + (bitMatrix[i]?(i==0?1:(i==1?2:(i==2?4:(i==3?8:(i==4?16:(i==5?32:(i==6?64:128))))))):0);
        
        TileConnectedTextureBlock tile = (TileConnectedTextureBlock) w.getTileEntity(x, y, z);
        if(Reference.connectedTextures && tile.getMode() != TileConnectedTextureBlock.noConnect) {
        	return idBuilder>255||idBuilder<0?textures[0]:textures[textureRefByID[idBuilder]];
        }
        else {
        	return textures[0];
        }
    }

    @Override
    public IIcon getIcon(int side, int meta)
    {
    	return textures[0];
    }

    public boolean onBlockActivated(World w, int x, int y, int z, EntityPlayer p, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
    {	
    	TileConnectedTextureBlock tile = (TileConnectedTextureBlock) w.getTileEntity(x, y, z);
    	
    	if(!w.isRemote && p.inventory.getCurrentItem() != null && p.inventory.getCurrentItem().getItem() == ModItems.chisel && p.inventory.getCurrentItem().getItemDamage() == 0) {
    		switch(tile.getMode()) {
    			case TileConnectedTextureBlock.connect1:
    				tile.setMode(TileConnectedTextureBlock.connect2);
    				return true;
    			case TileConnectedTextureBlock.connect2:
    				tile.setMode(TileConnectedTextureBlock.connect3);
    				return true;
    			case TileConnectedTextureBlock.connect3:
    				tile.setMode(TileConnectedTextureBlock.connect4);
    				return true;
    			case TileConnectedTextureBlock.connect4:
    				tile.setMode(TileConnectedTextureBlock.noConnect);
    				return true;
    			case TileConnectedTextureBlock.noConnect:
    				tile.setMode(TileConnectedTextureBlock.connect1);
    				return true;
    		}
    	}
        return false;
    }

@Override
public TileEntity createNewTileEntity(World w, int meta) {
	return new TileConnectedTextureBlock();
}
    
} 

 

Thanks for any help!

Posted

you'll notice System.out.println(tTile.getMode()); in shouldConnectToBlock();, this prints out 0, even after I make the change, until world reload.

 

EDIT: I figured out my issue, it is that the packet sending nbt to the client is only sent at world load/chunk load/tileentity loaded. I don't know how to force the packet to send, if anyone knows how, I guess that is the relevant question now. I want to be able to send it whenever the nbt is saved.

Posted

I cam across the same problem with my tile entitys when coding my mod, the way to get it to sync is to create your own packets.

To do this I first created a abstract class called IPacket which all my packet classes will extend;

 

[spoiler=IPacket Class]

import net.minecraft.entity.player.EntityPlayer;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;

public abstract class IPacket {

public abstract void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer);

public abstract void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer);

public abstract void handleClientSide(EntityPlayer player);

public abstract void handleServerSide(EntityPlayer player);

}

 

 

then from this I created a PacketPipeline class that will handle the packets for me

 

[spoiler=PacketPipeline Class]

import java.util.*;

import com.sirfatal.adventureplus.Network.Packets.*;
import com.sirfatal.adventureplus.utils.ModInfo;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageCodec;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.INetHandler;
import net.minecraft.network.NetHandlerPlayServer;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
import cpw.mods.fml.common.network.FMLOutboundHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.internal.FMLProxyPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@ChannelHandler.Sharable
public class PacketPipeline extends MessageToMessageCodec<FMLProxyPacket, IPacket> {

private EnumMap<Side, FMLEmbeddedChannel> channels;
private LinkedList<Class<? extends IPacket>> packets = new LinkedList<Class<? extends IPacket>>();
private boolean isPostInitialised = false;

/**
 * Register your packet with the pipeline. Discriminators are automatically
 * set.
 * 
 * @param clazz
 *            the class to register
 * 
 * @return whether registration was successful. Failure may occur if 256
 *         packets have been registered or if the registry already contains
 *         this packet
 */
public boolean registerPacket(Class<? extends IPacket> clazz) {
	if (this.packets.size() > 256) {
		// You should log here!!
		return false;
	}

	if (this.packets.contains(clazz)) {
		// You should log here!!
		return false;
	}

	if (this.isPostInitialised) {
		// You should log here!!
		return false;
	}

	this.packets.add(clazz);
	return true;
}

// In line encoding of the packet, including discriminator setting
@Override
protected void encode(ChannelHandlerContext ctx, IPacket msg, List<Object> out)
		throws Exception {
	ByteBuf buffer = Unpooled.buffer();
	Class<? extends IPacket> clazz = msg.getClass();
	if (!this.packets.contains(msg.getClass())) {
		throw new NullPointerException("No Packet Registered for: "
				+ msg.getClass().getCanonicalName());
	}

	byte discriminator = (byte) this.packets.indexOf(clazz);
	buffer.writeByte(discriminator);
	msg.encodeInto(ctx, buffer);
	FMLProxyPacket proxyPacket = new FMLProxyPacket(buffer.copy(), ctx.channel()
			.attr(NetworkRegistry.FML_CHANNEL).get());
	out.add(proxyPacket);
}

// In line decoding and handling of the packet
@Override
protected void decode(ChannelHandlerContext ctx, FMLProxyPacket msg, List<Object> out)
		throws Exception {
	ByteBuf payload = msg.payload();
	byte discriminator = payload.readByte();
	Class<? extends IPacket> clazz = this.packets.get(discriminator);
	if (clazz == null) {
		throw new NullPointerException("No packet registered for discriminator: "
				+ discriminator);
	}

	IPacket pkt = clazz.newInstance();
	pkt.decodeInto(ctx, payload.slice());

	EntityPlayer player;
	switch (FMLCommonHandler.instance().getEffectiveSide()) {
	case CLIENT:
		player = this.getClientPlayer();
		pkt.handleClientSide(player);
		break;

	case SERVER:
		INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get();
		player = ((NetHandlerPlayServer) netHandler).playerEntity;
		pkt.handleServerSide(player);
		break;

	default:
	}

	out.add(pkt);
}

// Method to call from FMLInitializationEvent
public void initialise() {
	this.channels = NetworkRegistry.INSTANCE.newChannel(ModInfo.CHANNEL, this);
	registerPackets();
}

public void registerPackets() {
	//registerPacket(PACKETFILENAME.class);
}

// Method to call from FMLPostInitializationEvent
// Ensures that packet discriminators are common between server and client
// by using logical sorting
public void postInitialise() {
	if (this.isPostInitialised) {
		return;
	}

	this.isPostInitialised = true;
	Collections.sort(this.packets, new Comparator<Class<? extends IPacket>>() {

		@Override
		public int compare(Class<? extends IPacket> clazz1, Class<? extends IPacket> clazz2) {
			int com = String.CASE_INSENSITIVE_ORDER.compare(clazz1.getCanonicalName(),
					clazz2.getCanonicalName());
			if (com == 0) {
				com = clazz1.getCanonicalName().compareTo(clazz2.getCanonicalName());
			}

			return com;
		}
	});
}

@SideOnly(Side.CLIENT)
private EntityPlayer getClientPlayer() {
	return Minecraft.getMinecraft().thePlayer;
}

/**
 * Send this message to everyone.
 * <p/>
 * Adapted from CPW's code in
 * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper
 * 
 * @param message
 *            The message to send
 */
public void sendToAll(IPacket message) {
	this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
			.set(FMLOutboundHandler.OutboundTarget.ALL);
	this.channels.get(Side.SERVER).writeAndFlush(message);
}

/**
 * Send this message to the specified player.
 * <p/>
 * Adapted from CPW's code in
 * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper
 * 
 * @param message
 *            The message to send
 * @param player
 *            The player to send it to
 */
public void sendTo(IPacket message, EntityPlayerMP player) {
	this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
			.set(FMLOutboundHandler.OutboundTarget.PLAYER);
	this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player);
	this.channels.get(Side.SERVER).writeAndFlush(message);
}

/**
 * Send this message to everyone within a certain range of a point.
 * <p/>
 * Adapted from CPW's code in
 * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper
 * 
 * @param message
 *            The message to send
 * @param point
 *            The
 *            {@link cpw.mods.fml.common.network.NetworkRegistry.TargetPoint}
 *            around which to send
 */
public void sendToAllAround(IPacket message, NetworkRegistry.TargetPoint point) {
	this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
			.set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
	this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point);
	this.channels.get(Side.SERVER).writeAndFlush(message);
}

/**
 * Send this message to everyone within the supplied dimension.
 * <p/>
 * Adapted from CPW's code in
 * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper
 * 
 * @param message
 *            The message to send
 * @param dimensionId
 *            The dimension id to target
 */
public void sendToDimension(IPacket message, int dimensionId) {
	this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
			.set(FMLOutboundHandler.OutboundTarget.DIMENSION);
	this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
			.set(dimensionId);
	this.channels.get(Side.SERVER).writeAndFlush(message);
}

/**
 * Send this message to the server.
 * <p/>
 * Adapted from CPW's code in
 * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper
 * 
 * @param message
 *            The message to send
 */
public void sendToServer(IPacket message) {
	this.channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET)
			.set(FMLOutboundHandler.OutboundTarget.TOSERVER);
	this.channels.get(Side.CLIENT).writeAndFlush(message);
}
}

 

 

 

In the register packet function you will want to put all the packets you want to register for example

registerPacket(PacketUpdateTE.class);

 

 

Next you want to setup your packet class for that tileentity, it will take in 3 parameters and also any other parameters you want to set, for example valueToSet can be whatever you want just make sure you register all your packet classes inside the packetpipeline.

[spoiler=Packet TileEntity Class]

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;

public class PacketTileTE extends IPacket {

int xPos, yPos, zPos, dimension;

int valueToSet;

public PacketTileTE() {

}

public PacketTileTE(int dimension, int xPos, int yPos, int zPos, int valueToSet) {
	this.dimension = dimension;
	this.xPos = xPos;
	this.yPos = yPos;
	this.zPos = zPos;

	this.valueToSet = valueToSet;
}

@Override
public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
	buffer.writeInt(xPos);
	buffer.writeInt(yPos);
	buffer.writeInt(zPos);

	buffer.writeInt(valueToSet);
}

@Override
public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
	xPos = buffer.readInt();
	yPos = buffer.readInt();
	zPos = buffer.readInt();

	x = buffer.readInt();
}

@Override
public void handleClientSide(EntityPlayer player) {
}

@Override
public void handleServerSide(EntityPlayer player) {
	World world = player.worldObj;
	TileEntity te = world.getTileEntity(xPos, yPos, zPos);
	if (te instanceof TILE) {
		NBTTagCompound data = new NBTTagCompound();
		((YOURTileEntity) te).setVALUE(valueToSet);
		((eventTileEntity) te).writeToNBT(data);
		packetPipeline.sendToAll(new PacketUpdateTE(xPos, yPos, zPos, data));
	}
}

}

 

 

 

The last class you will want to make is the PacketUpdateTE. This will just update you tile entity on the client side and can be used by multiple packet tile entity classes.

 

[spoiler=PacketUpdateTE]

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;

import com.sirfatal.adventureplus.Network.IPacket;

public class PacketUpdateTE extends IPacket {

private int xPos, yPos, zPos;
private NBTTagCompound data;

public PacketUpdateTE() {

}

public PacketUpdateTE(int xPos, int yPos, int zPos, NBTTagCompound data) {
	this.xPos = xPos;
	this.yPos = yPos;
	this.zPos = zPos;
	this.data = data;
}

@Override
public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
	PacketBuffer pckBuff = new PacketBuffer(buffer);
	pckBuff.writeInt(xPos);
	pckBuff.writeShort(yPos);
	pckBuff.writeInt(zPos);
	try {
		pckBuff.writeNBTTagCompoundToBuffer(data);
	} catch (Exception e) {
		e.printStackTrace();
	}
}

@Override
public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
	PacketBuffer pckBuff = new PacketBuffer(buffer);
	xPos = pckBuff.readInt();
	yPos = pckBuff.readShort();
	zPos = pckBuff.readInt();
	try {
		data = pckBuff.readNBTTagCompoundFromBuffer();
	} catch (Exception e) {
		e.printStackTrace();
	}
}

@Override
public void handleClientSide(EntityPlayer player) {
	TileEntity te = player.worldObj.getTileEntity(xPos, yPos, zPos);
	if (te != null) {
		te.readFromNBT(data);
	}
}

@Override
public void handleServerSide(EntityPlayer player) {
}

}

 

 

 

The final things you want to do is in your main mod class initialise the packet pipeline

public static final PacketPipeline packetPipeline = new PacketPipeline();

@EventHandler
public void initialise(FMLInitializationEvent evt) {
	packetPipeline.initialise();
}

@EventHandler
public void postInitialise(FMLPostInitializationEvent evt) {
	packetPipeline.postInitialise();
}

 

And also in your entity class where you want the sync to happen put

packetPipeline.sendToServer(new PacketENTITYTE(
			this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, VALUE));

 

If you want some more help just ask and also all this information can be found in the Netty Packet Tutorial on the forums HERE

 

-SirFatal :)

Posted

If you are going to send the entire NBT data, the easiest way is to use the vanilla TileEntity methods:

@Override
public Packet getDescriptionPacket() {
NBTTagCompound tag = new NBTTagCompound();
this.writeToNBT(tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}

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

That will make sure your tile entity is updated on the client when the block is first placed or the world loads, as well as whenever the block is forced to update.

 

Then, whenever you need to update your tile entity manually, you can simply mark the block for an update and it will do the work for you:

worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);

Posted

I'm still having issues with the block not re-rendering when it receives packets and blocks around it not doing the same thing.

 

EDIT: I should have tried this before posting, but I used my original onDataPacket method to fix it (marking block for redner update.)

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • From the page I downloaded the software and installed all the chipset drivers.
    • okay so i have this project (im new btw first ever project) and i keep getting this error inside my build.gradle file and if its fixed a new error appears then if thats fixed it loops!   1:29:26 PM: Executing 'runClient --scan --info'… The client will now receive all logging from the daemon (pid: 22264). The daemon log file: C:\Users\2010r\.gradle\daemon\8.8\daemon-22264.out.log Starting 23rd build in daemon [uptime: 39 mins 57.553 secs, performance: 100%, GC rate: 0.00/s, heap usage: 0% of 4 GiB] Using 28 worker leases. Now considering [C:\Users\2010r\OneDrive\Desktop\stuffiesss] as hierarchies to watch Watching the file system is configured to be enabled if available File system watching is active Transforming external-system-rt.jar with InstrumentationAnalysisTransform Transforming external-system-rt.jar with InstrumentationAnalysisTransform Transforming external-system-rt.jar with MergeInstrumentationAnalysisTransform Transforming external-system-rt.jar with ExternalDependencyInstrumentingArtifactTransform Starting Build Transforming develocity-gradle-plugin-3.17.4.jar (com.gradle:develocity-gradle-plugin:3.17.4) with InstrumentationAnalysisTransform Transforming foojay-resolver-0.7.0.jar (org.gradle.toolchains:foojay-resolver:0.7.0) with InstrumentationAnalysisTransform Transforming gson-2.9.1.jar (com.google.code.gson:gson:2.9.1) with InstrumentationAnalysisTransform Transforming develocity-gradle-plugin-3.17.4.jar (com.gradle:develocity-gradle-plugin:3.17.4) with InstrumentationAnalysisTransform Transforming develocity-gradle-plugin-3.17.4.jar (com.gradle:develocity-gradle-plugin:3.17.4) with MergeInstrumentationAnalysisTransform Transforming foojay-resolver-0.7.0.jar (org.gradle.toolchains:foojay-resolver:0.7.0) with InstrumentationAnalysisTransform Transforming foojay-resolver-0.7.0.jar (org.gradle.toolchains:foojay-resolver:0.7.0) with MergeInstrumentationAnalysisTransform Transforming gson-2.9.1.jar (com.google.code.gson:gson:2.9.1) with InstrumentationAnalysisTransform Transforming gson-2.9.1.jar (com.google.code.gson:gson:2.9.1) with MergeInstrumentationAnalysisTransform Transforming develocity-gradle-plugin-3.17.4.jar (com.gradle:develocity-gradle-plugin:3.17.4) with ExternalDependencyInstrumentingArtifactTransform Transforming foojay-resolver-0.7.0.jar (org.gradle.toolchains:foojay-resolver:0.7.0) with ExternalDependencyInstrumentingArtifactTransform Transforming gson-2.9.1.jar (com.google.code.gson:gson:2.9.1) with ExternalDependencyInstrumentingArtifactTransform Settings evaluated using settings file 'C:\Users\2010r\OneDrive\Desktop\stuffiesss\settings.gradle'. Projects loaded. Root project using build file 'C:\Users\2010r\OneDrive\Desktop\stuffiesss\build.gradle'. Included projects: [root project 'stuffiesss'] > Configure project : Evaluating root project 'stuffiesss' using build file 'C:\Users\2010r\OneDrive\Desktop\stuffiesss\build.gradle'. Transforming ForgeGradle-6.0.36.jar (net.minecraftforge.gradle:ForgeGradle:6.0.36) with InstrumentationAnalysisTransform Transforming commons-io-2.11.0.jar (commons-io:commons-io:2.11.0) with InstrumentationAnalysisTransform Transforming JarJarSelector-0.3.19.jar (net.minecraftforge:JarJarSelector:0.3.19) with InstrumentationAnalysisTransform Transforming JarJarMetadata-0.3.19.jar (net.minecraftforge:JarJarMetadata:0.3.19) with InstrumentationAnalysisTransform Transforming gson-2.10.1.jar (com.google.code.gson:gson:2.10.1) with InstrumentationAnalysisTransform Transforming guava-31.1-jre.jar (com.google.guava:guava:31.1-jre) with InstrumentationAnalysisTransform Transforming fastcsv-2.2.1.jar (de.siegmar:fastcsv:2.2.1) with InstrumentationAnalysisTransform Transforming artifactural-3.0.20.jar (net.minecraftforge:artifactural:3.0.20) with InstrumentationAnalysisTransform Transforming unsafe-0.2.0.jar (net.minecraftforge:unsafe:0.2.0) with InstrumentationAnalysisTransform Transforming maven-artifact-3.9.1.jar (org.apache.maven:maven-artifact:3.9.1) with InstrumentationAnalysisTransform Transforming httpclient-4.5.14.jar (org.apache.httpcomponents:httpclient:4.5.14) with InstrumentationAnalysisTransform Transforming srgutils-0.5.10.jar (net.minecraftforge:srgutils:0.5.10) with InstrumentationAnalysisTransform Transforming DiffPatch-2.0.12-all.jar (net.minecraftforge:DiffPatch:2.0.12) with InstrumentationAnalysisTransform Transforming failureaccess-1.0.1.jar (com.google.guava:failureaccess:1.0.1) with InstrumentationAnalysisTransform Transforming listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar (com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava) with InstrumentationAnalysisTransform Transforming jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) with InstrumentationAnalysisTransform Transforming checker-qual-3.12.0.jar (org.checkerframework:checker-qual:3.12.0) with InstrumentationAnalysisTransform Transforming error_prone_annotations-2.11.0.jar (com.google.errorprone:error_prone_annotations:2.11.0) with InstrumentationAnalysisTransform Transforming j2objc-annotations-1.3.jar (com.google.j2objc:j2objc-annotations:1.3) with InstrumentationAnalysisTransform Transforming plexus-utils-3.5.1.jar (org.codehaus.plexus:plexus-utils:3.5.1) with InstrumentationAnalysisTransform Transforming commons-lang3-3.9.jar (org.apache.commons:commons-lang3:3.9) with InstrumentationAnalysisTransform Transforming httpcore-4.4.16.jar (org.apache.httpcomponents:httpcore:4.4.16) with InstrumentationAnalysisTransform Transforming commons-logging-1.2.jar (commons-logging:commons-logging:1.2) with InstrumentationAnalysisTransform Transforming commons-codec-1.11.jar (commons-codec:commons-codec:1.11) with InstrumentationAnalysisTransform Transforming fastutil-8.3.1.jar (it.unimi.dsi:fastutil:8.3.1) with InstrumentationAnalysisTransform Transforming commons-compress-1.18.jar (org.apache.commons:commons-compress:1.18) with InstrumentationAnalysisTransform Transforming xz-1.8.jar (org.tukaani:xz:1.8) with InstrumentationAnalysisTransform Transforming jopt-simple-5.0.4.jar (net.sf.jopt-simple:jopt-simple:5.0.4) with InstrumentationAnalysisTransform Transforming noexception-1.7.1.jar (com.machinezoo.noexception:noexception:1.7.1) with InstrumentationAnalysisTransform Transforming slf4j-simple-1.7.30.jar (org.slf4j:slf4j-simple:1.7.30) with InstrumentationAnalysisTransform Transforming slf4j-api-1.7.30.jar (org.slf4j:slf4j-api:1.7.30) with InstrumentationAnalysisTransform Transforming ForgeGradle-6.0.36.jar (net.minecraftforge.gradle:ForgeGradle:6.0.36) with InstrumentationAnalysisTransform Transforming ForgeGradle-6.0.36.jar (net.minecraftforge.gradle:ForgeGradle:6.0.36) with MergeInstrumentationAnalysisTransform Transforming commons-io-2.11.0.jar (commons-io:commons-io:2.11.0) with InstrumentationAnalysisTransform Transforming commons-io-2.11.0.jar (commons-io:commons-io:2.11.0) with MergeInstrumentationAnalysisTransform Transforming JarJarSelector-0.3.19.jar (net.minecraftforge:JarJarSelector:0.3.19) with InstrumentationAnalysisTransform Transforming JarJarSelector-0.3.19.jar (net.minecraftforge:JarJarSelector:0.3.19) with MergeInstrumentationAnalysisTransform Transforming ForgeGradle-6.0.36.jar (net.minecraftforge.gradle:ForgeGradle:6.0.36) with ExternalDependencyInstrumentingArtifactTransform Transforming JarJarMetadata-0.3.19.jar (net.minecraftforge:JarJarMetadata:0.3.19) with InstrumentationAnalysisTransform Transforming JarJarMetadata-0.3.19.jar (net.minecraftforge:JarJarMetadata:0.3.19) with MergeInstrumentationAnalysisTransform Transforming commons-io-2.11.0.jar (commons-io:commons-io:2.11.0) with ExternalDependencyInstrumentingArtifactTransform Transforming JarJarSelector-0.3.19.jar (net.minecraftforge:JarJarSelector:0.3.19) with ExternalDependencyInstrumentingArtifactTransform Transforming gson-2.10.1.jar (com.google.code.gson:gson:2.10.1) with InstrumentationAnalysisTransform Transforming gson-2.10.1.jar (com.google.code.gson:gson:2.10.1) with MergeInstrumentationAnalysisTransform Transforming JarJarMetadata-0.3.19.jar (net.minecraftforge:JarJarMetadata:0.3.19) with ExternalDependencyInstrumentingArtifactTransform Transforming guava-31.1-jre.jar (com.google.guava:guava:31.1-jre) with InstrumentationAnalysisTransform Transforming guava-31.1-jre.jar (com.google.guava:guava:31.1-jre) with MergeInstrumentationAnalysisTransform Transforming gson-2.10.1.jar (com.google.code.gson:gson:2.10.1) with ExternalDependencyInstrumentingArtifactTransform Transforming fastcsv-2.2.1.jar (de.siegmar:fastcsv:2.2.1) with InstrumentationAnalysisTransform Transforming fastcsv-2.2.1.jar (de.siegmar:fastcsv:2.2.1) with MergeInstrumentationAnalysisTransform Transforming guava-31.1-jre.jar (com.google.guava:guava:31.1-jre) with ExternalDependencyInstrumentingArtifactTransform Transforming artifactural-3.0.20.jar (net.minecraftforge:artifactural:3.0.20) with InstrumentationAnalysisTransform Transforming fastcsv-2.2.1.jar (de.siegmar:fastcsv:2.2.1) with ExternalDependencyInstrumentingArtifactTransform Transforming artifactural-3.0.20.jar (net.minecraftforge:artifactural:3.0.20) with MergeInstrumentationAnalysisTransform Transforming unsafe-0.2.0.jar (net.minecraftforge:unsafe:0.2.0) with InstrumentationAnalysisTransform Transforming unsafe-0.2.0.jar (net.minecraftforge:unsafe:0.2.0) with MergeInstrumentationAnalysisTransform Transforming artifactural-3.0.20.jar (net.minecraftforge:artifactural:3.0.20) with ExternalDependencyInstrumentingArtifactTransform Transforming maven-artifact-3.9.1.jar (org.apache.maven:maven-artifact:3.9.1) with InstrumentationAnalysisTransform Transforming maven-artifact-3.9.1.jar (org.apache.maven:maven-artifact:3.9.1) with MergeInstrumentationAnalysisTransform Transforming unsafe-0.2.0.jar (net.minecraftforge:unsafe:0.2.0) with ExternalDependencyInstrumentingArtifactTransform Transforming httpclient-4.5.14.jar (org.apache.httpcomponents:httpclient:4.5.14) with InstrumentationAnalysisTransform Transforming httpclient-4.5.14.jar (org.apache.httpcomponents:httpclient:4.5.14) with MergeInstrumentationAnalysisTransform Transforming maven-artifact-3.9.1.jar (org.apache.maven:maven-artifact:3.9.1) with ExternalDependencyInstrumentingArtifactTransform Transforming srgutils-0.5.10.jar (net.minecraftforge:srgutils:0.5.10) with InstrumentationAnalysisTransform Transforming httpclient-4.5.14.jar (org.apache.httpcomponents:httpclient:4.5.14) with ExternalDependencyInstrumentingArtifactTransform Transforming srgutils-0.5.10.jar (net.minecraftforge:srgutils:0.5.10) with MergeInstrumentationAnalysisTransform Transforming DiffPatch-2.0.12-all.jar (net.minecraftforge:DiffPatch:2.0.12) with InstrumentationAnalysisTransform Transforming srgutils-0.5.10.jar (net.minecraftforge:srgutils:0.5.10) with ExternalDependencyInstrumentingArtifactTransform Transforming DiffPatch-2.0.12-all.jar (net.minecraftforge:DiffPatch:2.0.12) with MergeInstrumentationAnalysisTransform Transforming failureaccess-1.0.1.jar (com.google.guava:failureaccess:1.0.1) with InstrumentationAnalysisTransform Transforming failureaccess-1.0.1.jar (com.google.guava:failureaccess:1.0.1) with MergeInstrumentationAnalysisTransform Transforming DiffPatch-2.0.12-all.jar (net.minecraftforge:DiffPatch:2.0.12) with ExternalDependencyInstrumentingArtifactTransform Transforming listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar (com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava) with InstrumentationAnalysisTransform Transforming listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar (com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava) with MergeInstrumentationAnalysisTransform Transforming failureaccess-1.0.1.jar (com.google.guava:failureaccess:1.0.1) with ExternalDependencyInstrumentingArtifactTransform Transforming jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) with InstrumentationAnalysisTransform Transforming jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) with MergeInstrumentationAnalysisTransform Transforming listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar (com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava) with ExternalDependencyInstrumentingArtifactTransform Transforming checker-qual-3.12.0.jar (org.checkerframework:checker-qual:3.12.0) with InstrumentationAnalysisTransform Transforming checker-qual-3.12.0.jar (org.checkerframework:checker-qual:3.12.0) with MergeInstrumentationAnalysisTransform Transforming jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) with ExternalDependencyInstrumentingArtifactTransform Transforming error_prone_annotations-2.11.0.jar (com.google.errorprone:error_prone_annotations:2.11.0) with InstrumentationAnalysisTransform Transforming error_prone_annotations-2.11.0.jar (com.google.errorprone:error_prone_annotations:2.11.0) with MergeInstrumentationAnalysisTransform Transforming j2objc-annotations-1.3.jar (com.google.j2objc:j2objc-annotations:1.3) with InstrumentationAnalysisTransform Transforming j2objc-annotations-1.3.jar (com.google.j2objc:j2objc-annotations:1.3) with MergeInstrumentationAnalysisTransform Transforming error_prone_annotations-2.11.0.jar (com.google.errorprone:error_prone_annotations:2.11.0) with ExternalDependencyInstrumentingArtifactTransform Transforming plexus-utils-3.5.1.jar (org.codehaus.plexus:plexus-utils:3.5.1) with InstrumentationAnalysisTransform Transforming checker-qual-3.12.0.jar (org.checkerframework:checker-qual:3.12.0) with ExternalDependencyInstrumentingArtifactTransform Transforming j2objc-annotations-1.3.jar (com.google.j2objc:j2objc-annotations:1.3) with ExternalDependencyInstrumentingArtifactTransform Transforming plexus-utils-3.5.1.jar (org.codehaus.plexus:plexus-utils:3.5.1) with MergeInstrumentationAnalysisTransform Transforming commons-lang3-3.9.jar (org.apache.commons:commons-lang3:3.9) with InstrumentationAnalysisTransform Transforming commons-lang3-3.9.jar (org.apache.commons:commons-lang3:3.9) with MergeInstrumentationAnalysisTransform Transforming plexus-utils-3.5.1.jar (org.codehaus.plexus:plexus-utils:3.5.1) with ExternalDependencyInstrumentingArtifactTransform Transforming httpcore-4.4.16.jar (org.apache.httpcomponents:httpcore:4.4.16) with InstrumentationAnalysisTransform Transforming httpcore-4.4.16.jar (org.apache.httpcomponents:httpcore:4.4.16) with MergeInstrumentationAnalysisTransform Transforming commons-lang3-3.9.jar (org.apache.commons:commons-lang3:3.9) with ExternalDependencyInstrumentingArtifactTransform Transforming commons-logging-1.2.jar (commons-logging:commons-logging:1.2) with InstrumentationAnalysisTransform Transforming commons-logging-1.2.jar (commons-logging:commons-logging:1.2) with MergeInstrumentationAnalysisTransform Transforming httpcore-4.4.16.jar (org.apache.httpcomponents:httpcore:4.4.16) with ExternalDependencyInstrumentingArtifactTransform Transforming commons-codec-1.11.jar (commons-codec:commons-codec:1.11) with InstrumentationAnalysisTransform Transforming commons-codec-1.11.jar (commons-codec:commons-codec:1.11) with MergeInstrumentationAnalysisTransform Transforming commons-logging-1.2.jar (commons-logging:commons-logging:1.2) with ExternalDependencyInstrumentingArtifactTransform Transforming fastutil-8.3.1.jar (it.unimi.dsi:fastutil:8.3.1) with InstrumentationAnalysisTransform Transforming fastutil-8.3.1.jar (it.unimi.dsi:fastutil:8.3.1) with MergeInstrumentationAnalysisTransform Transforming commons-codec-1.11.jar (commons-codec:commons-codec:1.11) with ExternalDependencyInstrumentingArtifactTransform Transforming commons-compress-1.18.jar (org.apache.commons:commons-compress:1.18) with InstrumentationAnalysisTransform Transforming commons-compress-1.18.jar (org.apache.commons:commons-compress:1.18) with MergeInstrumentationAnalysisTransform Transforming fastutil-8.3.1.jar (it.unimi.dsi:fastutil:8.3.1) with ExternalDependencyInstrumentingArtifactTransform Transforming xz-1.8.jar (org.tukaani:xz:1.8) with InstrumentationAnalysisTransform Transforming xz-1.8.jar (org.tukaani:xz:1.8) with MergeInstrumentationAnalysisTransform Transforming commons-compress-1.18.jar (org.apache.commons:commons-compress:1.18) with ExternalDependencyInstrumentingArtifactTransform Transforming jopt-simple-5.0.4.jar (net.sf.jopt-simple:jopt-simple:5.0.4) with InstrumentationAnalysisTransform Transforming xz-1.8.jar (org.tukaani:xz:1.8) with ExternalDependencyInstrumentingArtifactTransform Transforming jopt-simple-5.0.4.jar (net.sf.jopt-simple:jopt-simple:5.0.4) with MergeInstrumentationAnalysisTransform Transforming noexception-1.7.1.jar (com.machinezoo.noexception:noexception:1.7.1) with InstrumentationAnalysisTransform Transforming noexception-1.7.1.jar (com.machinezoo.noexception:noexception:1.7.1) with MergeInstrumentationAnalysisTransform Transforming slf4j-simple-1.7.30.jar (org.slf4j:slf4j-simple:1.7.30) with InstrumentationAnalysisTransform Transforming jopt-simple-5.0.4.jar (net.sf.jopt-simple:jopt-simple:5.0.4) with ExternalDependencyInstrumentingArtifactTransform Transforming slf4j-simple-1.7.30.jar (org.slf4j:slf4j-simple:1.7.30) with MergeInstrumentationAnalysisTransform Transforming slf4j-api-1.7.30.jar (org.slf4j:slf4j-api:1.7.30) with InstrumentationAnalysisTransform Transforming noexception-1.7.1.jar (com.machinezoo.noexception:noexception:1.7.1) with ExternalDependencyInstrumentingArtifactTransform Transforming slf4j-api-1.7.30.jar (org.slf4j:slf4j-api:1.7.30) with MergeInstrumentationAnalysisTransform Transforming slf4j-simple-1.7.30.jar (org.slf4j:slf4j-simple:1.7.30) with ExternalDependencyInstrumentingArtifactTransform Transforming slf4j-api-1.7.30.jar (org.slf4j:slf4j-api:1.7.30) with ExternalDependencyInstrumentingArtifactTransform Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. Watched directory hierarchies: [] Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Use defined at https://gradle.com/help/legal-terms-of-use. Do you accept these terms? [yes, no]  FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\2010r\OneDrive\Desktop\stuffiesss\build.gradle' line: 35 * What went wrong: A problem occurred evaluating root project 'stuffiesss'. > Cannot get property 'mappingsChannel' on extra properties extension as it does not exist * Try: > Run with --stacktrace option to get the stack trace. > Run with --debug option to get more log output. > Get more help at https://help.gradle.org. BUILD FAILED in 691ms then here is the code    buildscript { repositories { maven { url = 'https://maven.minecraftforge.net/' } mavenCentral() } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:6.0.36' } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'idea' group = 'com.temmiemanz.backroommod' archivesBaseName = 'backroommod' version = '1.0.0' java.toolchain.languageVersion = JavaLanguageVersion.of(17) //Proper naming convention for the Properties: These were fixed to adhere to the casing convention ext { minecraft_version = "1.19.2" forge_version = "43.2.0" forgeVer = "${minecraft_version}-${forge_version}" mappingsChannel = "official" mappingsVersion = minecraft_version } sourceSets.main.resources { srcDir 'src/main/resources' } minecraft { // Use the ext object *explicitly using ext.* mappings channel: ext.mappingsChannel, version: ext.mappingsVersion // Use ext to make sure every call is made to the external properties and not the property itself version = "${ext.minecraft_version}-${ext.forge_version}" runs { client { workingDirectory project.file('run') args '--username', 'Dev' property 'forge.logging.console.level', 'info' } server { workingDirectory project.file('run') property 'forge.logging.console.level', 'info' args '--nogui' } } } processResources { inputs.property "version", project.version inputs.property "mcversion", ext.minecraft_version from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' expand 'version': project.version, 'mcversion': project.ext.minecraft_version } from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } dependencies { minecraft "net.minecraftforge:forge:${ext.minecraft_version}-${ext.forge_version}" } jar { manifest { attributes([ "Specification-Title": "backroommod", "Specification-Vendor": "temmiemanz", "Specification-Version": "1", "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor": "temmiemanz", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } (sorry about the weird formating)  
    • [13:02:36] [main/ERROR]:Mixin config fabric-item-api-v1.client.mixins.json does not specify "minVersion" property [13:02:36] [main/ERROR]:Mixin config entity_model_features.mixins.json does not specify "minVersion" property [13:02:37] [main/ERROR]:Mixin config beautifulcampfires.mixins.json does not specify "minVersion" property [13:02:37] [main/ERROR]:Mixin config portablespawner.mixins.json does not specify "minVersion" property [13:02:37] [main/ERROR]:Mixin config celestisynth.mixins.json does not specify "minVersion" property [13:02:37] [main/ERROR]:Mixin config fabric-item-group-api-v1.mixins.json does not specify "minVersion" property [13:02:37] [main/ERROR]:Mixin config fabric-item-group-api-v1.client.mixins.json does not specify "minVersion" property [13:02:37] [main/ERROR]:Mixin config fabric-data-attachment-api-v1.mixins.json does not specify "minVersion" property [13:02:37] [main/ERROR]:Mixin config fabric-data-attachment-api-v1.client.mixins.json does not specify "minVersion" property [13:02:37] [main/ERROR]:Mixin config pipeorgans.mixins.json does not specify "minVersion" property [13:02:42] [main/ERROR]:com.electronwill.nightconfig.core.io.ParsingException: Invalid TOML data: entry "[fastfurnace]" defined twice in its table. [13:02:42] [main/ERROR]:com.electronwill.nightconfig.core.io.ParsingException: Invalid TOML data: entry "[fastfurnace]" defined twice in its table.
    • Temu  bunch of Coupon Codes for Temu  to get FTemuREE GIFTS, DISCOUNTS, SAVINGS, and MORE. Check out below and download the Temu  app now !!! Temu  Coupon Code ( acy240173) 30% Off + 100€ OFF in Coupons + Free Shipping + More for Temu  NEW / EXISTING Users. Get 100€ OFF in Coupons + 30% OFF + More; Temu  promo code ( acy240173 ). Temu  Sitewide Sales up to 95% OFF sitewide. Temu  30% Off and 100€ Off in Coupons for NEW and EXISTING users. Use promo code ( acy240173) at checkout!!   Temu  coupon codes for New users 100€ Off - acy240173 Temu  discount code for New customers- acy240173 Temu  100€ coupon code- acy240173 what are Temu  codes - acy240173  does Temu  give you €300- acy240173 Yes Verified Temu  coupon code October2025- acy240173 Temu  New customer offer acy240173 Temu  discount code2025 acy240173 100 off coupon code Temu  acy240173 Temu  100 off any order acy240173 100 dollar off Temu  code acy240173 Temu  Coupon Code ( acy240173 ) 30% Off + 100€ OFF in Coupons + Free Shipping + More for Temu  NEW / EXISTING Users. Get 100€ OFF in Coupons + 30% OFF + More; Temu  promo code (acy240173 ) or ( acy240173 ). Temu  Sitewide Sales up to 95% OFF sitewide. Temu  30% Off and 100€ Off in Coupons for NEW and EXISTING users. Use promo code ( acy240173 ) at checkout!! Temu  coupon code for First Order - {acy240173} Temu  coupon code for New Users- {acy240173} Temu  coupon code for Existing Users- {acy240173} Temu  coupon code 100€ Off- {acy240173} Temu  coupon 30% Off code - {acy240173} - Temu  new user coupon code: acy240173 - Free gift on Temu : acy240173 - Temu  90% discount coupon code: acy240173 - Temu  100€ coupon code for first order: acy240173   Is the Temu  100€ Coupon Legit?  Yes, there are several legit Temu  coupon codes [ acy240173] available for 100€ off. Here are the options you can use: Code [acy240173]: This code provides a 100€ discount legit on your first order when you register and is reported to work effectively during checkout. Code [acy240173]: New users can also use this code to receive a 100€ discount on purchases over €249. Code [acy240173]: This code is available for both new and existing users, offering a 100€ discount on your order. Code [acy240173]: Another option for both new and existing users, this code allows you to save 100€ on your purchase.   Temu  Coupon code 100€ off for this month For October2025, several active Temu  coupon codes can help you save on your purchases: 40% Off Site-Wide: Use code "acy240173" to get 40% off everything. This code is widely used and verified for site-wide discounts on orders over €20. 40€ Off for New Customers: New customers can receive a €20 voucher by downloading the Temu  app and participating in an H5 page game. This voucher can be redeemed using a specific coupon “acy240173”. 40% Off Selected Items: There is also a 40% off coupon “acy240173” available for select items on the Temu  website. Remember to check the specific terms and conditions for each coupon, such as minimum purchase requirements and applicable product categories.   Temu  coupon code 100€ off for new and existing customer Temu  90% OFF promo code "acy240173 " will save you 100€ on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu  offers 100€ off coupon code [acy240173] Temu  Coupon code [acy240173 ] for existing users can get up to 50% discount on product during checkout. Temu  Coupon Codes for Existing Customers-[acy240173 ] Temu  values its loyal customers and offers various promo codes, including the Legit Temu  Coupon Code [acy240173 ] or [acy240173 ], which existing users can use. This ensures that repeat shoppers can also benefit from significant discounts on their purchases. Keep an eye out for special promotions and offers that are periodically available to enhance your shopping experience.   Temu  Coupon Code 100€ Off for all users  There are specific Temu  coupon codes [acy240173] mentioned for South Africa in the provided search results. The results focus on general Temu  coupon codes [acy240173] and discounts, as well as codes for other countries like the Germany, UK, Canada, Mexico, Kuwait, Austria, Italy, Australia, France , Switzerland, Poland, Saudi Arabia, Germany, Sweden, Portugal, New Zealand, UAE, Belgium, Germany, and France.   Temu  Coupon Code 30% Off: acy240173 Temu  Coupon Code 100€ Off: acy240173 Temu  Coupon Code 100€ Off United States : acy240173 Temu  Coupon Code 100€ Off Germany: acy240173 Temu  Coupon Code 100€ Off Sweden : acy240173 Temu  Coupon Code 100€ Off Finland : acy240173 Temu  Coupon Code 50% : acy240173 Temu  Coupon Code 100€ Off United Kingdom : acy240173 Temu  Coupon Code 100€ Off : acy240173 Temu  Coupon Code 100€ Off : acy240173 Temu  Coupon Code 100€ Off Italy : acy240173 Temu  Coupon Code  100€ Off : acy240173 Temu  Coupon Code 100€ Off Austria : acy240173 Temu  Coupon Code 100€ Off Belgium : acy240173 Temu  Coupon Code 100€ Off : acy240173 Temu  Coupon Code 100€ Off Canada : acy240173 Temu  Coupon Code 100€ Off : acy240173 Temu  Coupon Code 100€ Off Estonia : acy240173 Temu  Coupon Code 100€ Off Switzerland : acy240173 Temu  Coupon Code  100€ Off : acy240173 Temu  Coupon 30% Off + Free Shipping & More There are a bunch of Coupon Codes for Temu  to get FREE GIFTS, DISCOUNTS, SAVINGS, and MORE. Check out below and download the Temu  app now !!! Temu  Coupon Code ( acy240173) 30% Off + 100€ OFF in Coupons + Free Shipping + More for Temu  NEW / EXISTING Users. Get 100€ OFF in Coupons + 30% OFF + More; Temu  promo code (acy240173) \ Temu  Sitewide Sales up to 95% OFF sitewide. Temu  30% Off and 100€ Off in Coupons for NEW and EXISTING users. Use promo code ( acy240173) at checkout!!Temu  Coupon Code Mexico : acy240173 Temu  Coupon Code 100€ Off Ireland : acy240173 Temu  Coupon Code 100€ Off Norway: acy240173 Temu  Coupon Code 100€ Off New Zealand : acy240173 Temu  Coupon Code 100€ Off Poland : acy240173 Temu  Coupon Code 100€ Off Serbia : acy240173 Temu  Coupon Code 100€ Off Armenia : acy240173 Temu  Coupon Code 100€ Off Austria : acy240173 Temu  Coupon Code 100€ Off Greece : acy240173 Temu  Coupon Code 100€ Off Japan : acy240173 Temu  Coupon Code 100€ Off Iceland : acy240173 Temu  Coupon Code 100€ Off Bahrain : acy240173 Temu  Coupon Code 100€ Off Philippines : acy240173 Temu  Coupon Code 100€ Off Portugal : acy240173 Temu  Coupon Code 100€ Off Romania: acy240173 Temu  Coupon Code 100€ Off Slovakia : acy240173 Temu  Coupon Code 100€ Off Malta: acy240173 Temu  Coupon Code 100€ Off France  : acy240173 Temu  Coupon Code 100€ Off South Africa : acy240173 Temu  Coupon Code 100€ Off Hungary : acy240173 Temu  Coupon Code 100€ Off Brazil : acy240173 Temu  Coupon Code 100€ Off Finland : acy240173 Temu  Coupon Code 100€ Off Morocco : acy240173 Temu  Coupon Code 100€ Off Kazakhstan : acy240173 Temu  Coupon Code 100€ Off Colombia : acy240173 Temu  Coupon Code 100€ Off Chile : acy240173 Temu  Coupon Code 100€ Off Israel : acy240173 Temu  Coupon Code 100€ Off Qatar: acy240173 Temu  Coupon Code 100€ Off Slovenia : acy240173 Temu  Coupon Code 100€ Off Uruguay : acy240173 Temu  Coupon Code 100€ Off Latvia: acy240173 Temu  Coupon Code 100€ Off Jordan : acy240173 Temu  Coupon Code 100€ Off Ukraine : acy240173 Temu  Coupon Code 100€ Off Moldova : acy240173 Temu  Coupon Code 100€ Off Oman: acy240173 Temu  Coupon Code 100€ Off Mauritius : acy240173 Temu  Coupon Code 100€ Off Republic of Korea : acy240173 Temu  Coupon Code 100€ Off Dominican Republic: acy240173 Temu  Coupon Code 100€ Off Czech Republic : acy240173 Temu  Coupon Code 100€ Off United Arab Emirates : acy240173 Temu  Coupon Code 100€ Off Peru : acy240173 Temu  Coupon Code 100€ Off Azerbaijan : acy240173 Temu  Coupon Code 100€ Off Saudi Arabia : acy240173 Temu  Coupon Code 100€ Off Croatia : acy240173   Conclusion The Temu  Coupon Code 100€ Off "acy240173" provides a significant discount of 100€ for users in Bahrain. This offer is available for both new and existing customers, allowing them to save substantially on their purchases.In addition to the 100€ discount, customers can also enjoy a 50% off on their orders. To redeem this coupon, simply sign up for a Temu  account, add items worth 100€ or more to your cart, and enter the code during checkout to apply the discounts automatically.   FAQs about the 100€ Off Coupon Code Q1: Who can use the 100€ off coupon? A: The coupon is available for both new and existing users, although different codes may apply to each group. Q2: Can multiple coupon codes be used at once? A: Generally, only one coupon code can be applied per transaction. However, some codes may offer bundled benefits. Q3: Do these coupons expire? A: Many Temu  coupons do not have an expiration date, making them convenient for users to redeem at their leisure. Q4: Are there specific conditions for using these coupons? A: Yes, some coupons may require a minimum purchase amount or specific item categories to be eligible for the discount. Q5: How can I find the latest Temu  Coupon Code 100€ Off 100€ Offs? A: Users can check within their account under "Coupons & offers" or look for updates on promotional websites and forums.
  • Topics

×
×
  • Create New...

Important Information

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