Didn't noticed that these needed called inorder to function correctly.
Though i guess the UE loader mod would have covered this for me its
better to be safe than sorry.
Instead of ints i've changed it to string IDs too allow for more defined
ids per tile. Should remove any issues with super tiles using the same
packet ID as the tiles that extend them.
This will be the first block of many to have its own config file. The
idea when i created the BlockRegistry was to also implement a system to
allow blocks to declare custom configs. In other words allowing them to
define settings that can easily be linked to the block without large
config files.
Idea is to create a flex-able system to handle block registration,
settings, features, and setup. This include calling methods to register
block ore names, tile entities, and extra settings configuration files.
This will be connected to a more advanced config, id, and a few other
handlers. This way all block/items will be in sync when it comes to
creations, and handling.
The ammount of files in this project are getting out of hand tbh. I will
need to sit down later and sort them all out and remove any that are not
needed.
Mainly just copied the methods but its needed due to future changes to
these methods that were copied. Mainly the collision methods will need
to be redone when the logic is finished for lay down wires.
This was honestly very stupid why it wasn't working. It all came down
the a method called getOutputdirections. Honestly why did this stupid
enumset stuff return when its a bad way to track connections. It makes
rotation more complex, and can connect is good enough to handle both.
Any complex connection mojo should be handled by the update tick or
custom mod method rather then by default be there.
To be honest adding support for all things electrical will take time.
Main focus is to cover the basic UE machines, and parts. Then i will
move on to IC2 and buildcraft support if its easy to test. As well i
might have to cover mekanism in case it doesn't use the UE interfaces
for its machines.
Honestly i have to say this was done poorly but then again i think this
render is left over from when UE started. Also this will need to be
redone some more later to prevent issues were the client sees a
connection different then the server. A simple boolean array sent by
packet should solve this issue later on.
Not tested nor really done yet. The idea in creating these is to provide
a sure way to test basic functions of machines. Since these debug block
are very simple no real issue should arise of the block failing.
Added a basic packet handler system to the prefab TileEntityMachine
class to make sorting packet data easier for other tiles. This was
original part of assembly line but it seems more fitting to make it part
of the base prefab.
It now contains an extra update flag var allowing more control on how
the block is set after its was changes. This was mainly done to allow
the starter pump in FM to still function as an infinite water source
while drain several blocks at a time.
Mainly worthless but is used to make it easier for other classes to
check if a tile runs without power. Example is in NetworkSharedPower
class were it need to check for to see if it can run power less based
off it network parts.
Should allow networks that extend this to read and write data from there
tiles when its called. Mainly used to store important info in tiles
while merging or splitting a network. However, it is used by
NetworkFluidTiles class in FM for reading/writing fluid volumes to the
tiles.
Though general its a bad idea to control packet handling in a prefab
class i though it be best seeing as most of my machines need a client
update. As well added a generic consume power method that is called per
tick server side.
Fixed a null point crash with getting the block when trying to fill a
tile.
Added: FillTanksAllSides to make it easy for tiles to fill
IFluidHandlers around them
This should remove the need for other networks to have custom split or
merge code just to add a few lines of code. Example was the removal of
the needed for Fluid networks in FM to have custom split/merge code to
add balanceTanks() method.
This should prevent issues with config files generating but will not
prevent Block ID conflict with other mods. However, later i might expand
this to try to pre-register the block and correct its block ID if
something goes wrong.
At first i was going to keep the core as a simple loader but seeing that
need for content out of my DarkMachine mod i merged the two. This will
cause a bit of extra stuff for the player to deal with. However, i did
add configs to disable the ore and ore Items from the mod.
Removed TileEntityElectricMachine and replaced it with the UE
UniversalMachine class
Removed the BC to UE class as it is no longer needed or functional
Added NetworkSharedPower so that tileEntities can share power in a
network allowing things like Electric Fences or battery box grids.
However, it doesn't unloaded power then it is removed so should only be
used for running machines
This was at one point in time the BuildCraft fluid renderer. However, i
have rewrote most of it in order to fix it. BuiltCraft staff is welcome
to take anything from the render code they want.
If runable machine is an instance of INetworkPart it will not drain
power from any tile entity around it that shares the same network to
prevent self powering.
@calclavia update submodules as i'm still working on getting Bitbucket
to clone ICBM threw sourceTree. Something about modding-lib will not
cloning... if you moved it to bitbucket might want to give me access.
Sorry @Calclavia if this looks like copying but i want to use this class
in all my mods without including your library. This way i can allow
other modders to work on my code without asking for your code.
I think i still have a bit to work on to make this work as i'm not
getting a perfect circle in testing. Rather i'm getting a star shaped
pattern from the points.
This doesn't seem to be going well however i don't really understand how
to use them yet. Looking at them though i think OpenGl uses these for
model rotation. I might want to look into there code later...
I'll test this after i make a test frame for it. Though i think this
might be it as long as i got the ideal down. After i tried to go to
sleep my brain broke down the changes pre rotation. If Y axis changes
the XZ distance change. If Z Axis changes YX distance changes. If X Axis
changes YZ axis changes. After figuring that out now i can use sin cos
to get the radian angles and times that by radius to get the delta
change in position.... or at least that is what i think. Testing will
prove me right or wrong.
Got started on this and didn't stop to better document the changes.
First the man changes are to div out the network code to be more usable
in other way than fluids. As well to make a new network class for the
tanks which are now becoming a more like the pipes. I will later as well
make a mechanical network and a data network for later use.
On top of that there are some helper class that i didn't upload before i
started work. There is nothing too them as they were in the start of
development.
Still needs improved to be more flex-able and useable by other tiles.
However, it should be very useful for anyone doing autocrafting. As well
if anyone who uses it spots and issue fill free to improve/fix it.