Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- My goal is having my TE execute the method vent() after is spits the output item. The thing is, of course, that it does not work. I decompiled Thaumcraft and saw that when the process is finished it sends a packet to all nearby client that executes a method that then leads to vent().
- I've tried to make one myself but since I've never done packets before I got lost pretty quickly....
- for example, in onMessageReceived, I can't even find a way to get my TE since there's no World in the signature...
- public void vent() {
- if(this.worldObj.isRemote) {
- this.venting = -1;
- float fx = 0.1F - this.worldObj.rand.nextFloat() * 0.2F;
- float fz = 0.1F - this.worldObj.rand.nextFloat() * 0.2F;
- float fy = 0.1F - this.worldObj.rand.nextFloat() * 0.2F;
- float fx2 = 0.1F - this.worldObj.rand.nextFloat() * 0.2F;
- float fz2 = 0.1F - this.worldObj.rand.nextFloat() * 0.2F;
- float fy2 = 0.1F - this.worldObj.rand.nextFloat() * 0.2F;
- int color = 16777215;
- Thaumcraft.proxy.drawVentParticles(this.worldObj, this.xCoord + 0.5F + fx + this.face.offsetX / 2.0F, this.yCoord + 0.5F + fy, this.zCoord + 0.5F + fz + this.face.offsetZ / 2.0F, this.face.offsetX / 4.0F + fx2, fy2, this.face.offsetZ / 4.0F + fz2, color);
- }
- }
- private void EjectItems() {
- TileEntity inv = this.worldObj.getTileEntity(this.xCoord + this.face.offsetX, this.yCoord + this.face.offsetY, this.zCoord + this.face.offsetZ);
- if ((inv != null) && ((inv instanceof IInventory))) {
- insertItems();
- } else {
- spitItems(); vent();
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement