Well I guess the save bugs then are just from using an older method, will try basicsink..Oh! I should test my block without my dummy GUI in it..will do so in the afternoon!
Posts by LinusPhoenix
-
-
I don't think that's the issue, it's something to do with TileEntities not properly being saved or deleted when the chunk unloads.. and wrenching shouldn't interfere with that (at the moment you can use a pickaxe or the creative punch)
-
Well if I am not the only one..The weird thing is, everything works, just that warning pops up and makes you paranoid.
Edit: Okay, second weird thing, this time really a problem.
[Warnung] [IC2] EnergyTileUnloadEvent: posted for phnxflms.unidye.TileEntityWoolDyer@660ba0e5 client-side, aborting
[Warnung] [IC2] EnergyNet.addTileEntity: phnxflms.unidye.TileEntityWoolDyer@1c29bc9e (phnxflms.unidye.TileEntityWoolDyer@1c29bc9e) is conflicting with phnxflms.unidye.TileEntityWoolDyer@781e3783 using the same position (already added, prev. te not removed, overlapping), abortingThat happens when destroying a woolDyer block and then putting a new one on the same spot.
public class TileEntityWoolDyer extends TileEntity implements IEnergySink, IInventory{
public double energy = 0.0D;
public double maxEnergy = 1000.0D;
private boolean initialized;
@Override
public void onChunkUnload(){
super.onChunkUnload();
}
public void readFromNBT(NBTTagCompound nbttagcompound){
super.readFromNBT(nbttagcompound);
if(nbttagcompound.hasKey("energy")){
this.energy = nbttagcompound.getDouble("energy");
}
}
public void writeToNBT(NBTTagCompound nbttagcompound){
super.writeToNBT(nbttagcompound);
nbttagcompound.setDouble("energy", this.energy);
}
public void updateEntity(){
if(!initialized && worldObj != null) {
if(!worldObj.isRemote) {
EnergyTileLoadEvent loadEvent = new EnergyTileLoadEvent(this);
MinecraftForge.EVENT_BUS.post(loadEvent);
}
initialized = true;
}
}
@Override
public void invalidate(){
if(worldObj.isRemote){
EnergyTileUnloadEvent unloadEvent = new EnergyTileUnloadEvent(this);
MinecraftForge.EVENT_BUS.post(unloadEvent);
}
}
@Override
public boolean acceptsEnergyFrom(TileEntity emitter,
ForgeDirection direction) {
return true;
}@Override
public double demandedEnergyUnits() {
return this.maxEnergy - this.energy;
}@Override
public double injectEnergyUnits(ForgeDirection directionFrom, double amount) {
if (this.energy >= this.maxEnergy) return amount;
double openEnergy = this.maxEnergy - this.energy;
if(openEnergy >= amount) {
this.energy += amount;
return 0.0D;
} else if (amount > openEnergy) {
this.energy = this.maxEnergy;
return amount - openEnergy;
}
return 0;
}@Override
public int getMaxSafeInput() {
return 32;
} -
I decompiled it for some inspiration and now have a dummy gui that only accepts items, as well as a tileentity that stores energy but doesn't use it for anything and cannot output it.
Now, when the chunk unloads and you go back to the placed machine, something pops up in the console:[Warnung] [IC2] EnergyNet.addTileEntity: phnxflms.unidye.TileEntityWoolDyer@6bbe8ba2 (phnxflms.unidye.TileEntityWoolDyer@6bbe8ba2) is conflicting with phnxflms.unidye.TileEntityWoolDyer@67530ea1 using the same position (already added, prev. te not removed, overlapping), aborting
I am guessing I overlooked a method I should implement. This problem is only in the console, the stored items are still there and I can take them out without any problem..Before I work on actually making the GUI do stuff I would like to fix that bug before I run into more issues.
-
Welp, I really forgot about the possibility to just decompile it..I is smart.
-
Did anybody test out Space Engineers? I am 90% sure I will buy it this week on steam, but my other 10% would always love to be convinced too.
-
Hey guys,
for my mod unidye I plan on creating a machine to dye wool at a better ratio than vanilla. I have the block class and the base of a TileEntity class (using IC2 API's recommended BasicSink methods), blocks and tileentities are registered in my main class. Now how do I make it "work"? I know that's kind of a dumb question, but I don't really have a point to start. I know I will have to do checks for enough energy for the operation etc. with a couple of IC2 methods (Agkz has a tutorial on that) but how can I add a recipe or input items? Do I need a GUI for that or could it work without one?
I could simply extend greg's tile entities or something, but I'd much rather really understand how it works and not be GT-dependant since it should run on vanilla IC2 as well.
Hope that's not too much of a noobish question.
-
Just make it so you right click things in or pipe them in, and it just spits them out.Hm, let's see if it's more effort to learn about GUI or do some weird functionality workaround And I have no idea what google is doing these days. I was trying to find out chemical formulas of colours/dyes and I got some weird shit about baby poop and how you should check if it's the right color, like...wat
-
In IC2.cfg (under User->Appdata->Roaming->.minecraft->config if you are not using ftb launcher or alike) you can increase the cost for a bucket of uum to a ridiculously high amount if you are using 1.6.2.
-
coding GUIs doesnt look so fun.. Can't a machine used for dying wood at a better ratio just not use any? I am sure it would be great!
-
EnderIO is great, but I feel early ore processing kinda defeats the point of GregTech's Bronze Age..but the conduits are awesome, and it gives a good use for nether quartz
-
Since university, despite the work not being too much or too complex to understand (not that I understand all of it), I feel destroyed everyday when I get home around 6 pm. I could just immediately go to bed and don't have any motivation for anything than browsing imgur and silly subreddits.
So yeah, I would like to know too -
Tired from class warfare? Is the uprising of the proletariat draining your energy?
Leninade! The new refreshing beverage for our communist brothers brings your energy back nearly instantly! Now go and redistribute some wealth, comrade! -
Urgh, there are only three comedies popular on TV I really hate. TBBT, Two and a Half Men and 2 Broke Girls (in ascending order). I am just constantly cringing.
And I love livestreams Otherwise I am also interested in esports, so as long it's not 22 dudes chasing after a ball, I also like to watch that..
-
I read they are kinda harmless, not lethal, and just causing sickness symptoms for 1-2 days and the evacuation of a public school was a matter of precaution, not actual danger.
-
Well I'll just make it into for loops but won't change anything for my own dye items, I find it a lot easier to read.
-
since google's firrst proposal is "preemptive optimization is the root of all evil" I will think twice about doing that.
And yes, I do mean for loops.
-
quick question: does it make sense to use loops for adding recipes with a lot of metadata? would that be less laggy?
-
This is not a drill STOPSomeone should make a joke drill out of wood. And when you try it, it just spams "I CANT BELIEVE ITS NOT A DRILL"
-
Never used forestry farms before so I don't know how much they produce. Can't be more op than MFR
I planned on making early MJ with peat bogs, then qucikly realised there is not thermalexpansion.
Also, are villagers now suicidal? I found a village which got zombie invaded and these buggers opened their own doors for the zombies to come on and slaughter them! Well, so much for that give 3 emeralds, get 1 Flint&Stell Trade I saw..