Commit Graph
18 Commits
Author SHA1 Message Date
Richard Freimer 0d4b50908f Formatting and code readability cleanup (#5467)
* First pass reformatting code to be more readable (common still not done)

* Replace google common collect calls with Java calls where possible

* Remove a bunch of unnecessary parenthesis leaving clarifying ones

* Add some missing @Nonnull annotations

* Fix checking wrong type

* Remove unnecessary continue/return statements and simplify comparision check

* Pass exception instead of directly printing stack trace

* Work on cleaning up common, through config so far

* Work on cleaning up common, through integration so far

* Work on cleaning up common, through network so far

* Work on cleaning up common, through tier so far

* Remove empty constructors that get created by default anyways

* Work on cleaning up common, through transmitters so far

* Work on cleaning up common, through utils so far

* Finish cleaning up spacing for common
2019-05-11 14:13:24 -04:00
Xander bbcea85fc4 Respect NONE connection mode for Pipe Connections (#5387)
* prevent Out of Bounds exception in factory ItemMeshDefinition

* prevent Out of Bounds error in item stack display name

* Respect NONE connection between pipes. Fixes #4781

* prevent fluid/gas pipes from connecting if their contents arent the same (part 1)

* prevent some case of incorrect network merges that would convert/void a fluid/gas

* Add a way to check if a network is compatible with an buffer
Used for checking the orphan's buffer against the external network

* rename some generic type variables for readability

* introduce BUFFER generic type variable

* Fix missing null check causing new pipes not being able to be added to a network

* More checks for when there is an invalid factory

* bump api version & use a constant for all

* add default method to not break binary compat

* Refresh if a connection exists if a transmitter failed to combine two networks
Fallback to the network's buffer as if we have not saved any data yet the TE's buffer may still be null

* Add a way to get the pipes buffer falling back to the network, rather than doing it from the same method. This ensures that there is no accidental leakage where the count of the buffer matters

* Return a null buffer for pressurized tube buffer if the stack is empty

* Allow merging of networks when they are able to connect again
Visuals still need a minor update to sync the type it should be rendering

* Update network visuals when networks merge

* allow unconnected sides to have their mode set - except logistical transporters which already used that function, they only can un-NONE their unconnected sides
2019-04-20 13:38:14 +08:00
Dave Smith e0b7ea62a4 The Great Reformat; moving to google-java-style w/ 4 space indent and 120 column line wrap 2019-03-09 22:47:13 -07:00
Tom Elfring 6576335f44 Remove unnecessary modifiers and semicolons 2017-08-05 13:30:20 +02:00
aidancbrady 30447e40e2 Fixed balloon colors, fixed transmitter block render, fixed visual disconnect of transmitters on world load 2016-05-26 13:19:08 -04:00
aidancbrady 076fc3c383 Merge branch 'development' into 1.8.9
* development:
  Bump API version numbers
  Remove Lead Dust clone
  Separate vertical and horizontal textures for small transmitters

Conflicts:
	src/main/java/mekanism/api/energy/package-info.java
	src/main/java/mekanism/api/gas/package-info.java
	src/main/java/mekanism/api/infuse/package-info.java
	src/main/java/mekanism/api/lasers/package-info.java
	src/main/java/mekanism/api/package-info.java
	src/main/java/mekanism/api/reactor/package-info.java
	src/main/java/mekanism/api/recipe/package-info.java
	src/main/java/mekanism/api/transmitters/package-info.java
	src/main/java/mekanism/api/util/package-info.java
	src/main/java/mekanism/common/item/ItemOtherDust.java
	src/main/java/mekanism/common/multipart/PartThermodynamicConductor.java
	src/main/resources/assets/mekanism/textures/blocks/models/PressurizedTubeHorizontalAdvanced.png
	src/main/resources/assets/mekanism/textures/blocks/models/PressurizedTubeHorizontalBasic.png
	src/main/resources/assets/mekanism/textures/blocks/models/PressurizedTubeHorizontalElite.png
	src/main/resources/assets/mekanism/textures/blocks/models/PressurizedTubeHorizontalUltimate.png
	src/main/resources/assets/mekanism/textures/blocks/models/PressurizedTubeVerticalAdvanced.png
	src/main/resources/assets/mekanism/textures/blocks/models/PressurizedTubeVerticalBasic.png
	src/main/resources/assets/mekanism/textures/blocks/models/PressurizedTubeVerticalElite.png
	src/main/resources/assets/mekanism/textures/blocks/models/PressurizedTubeVerticalUltimate.png
	src/main/resources/assets/mekanism/textures/blocks/models/SmallTransmitterHorizontalAdvanced.png
	src/main/resources/assets/mekanism/textures/blocks/models/SmallTransmitterHorizontalBasic.png
	src/main/resources/assets/mekanism/textures/blocks/models/SmallTransmitterHorizontalElite.png
	src/main/resources/assets/mekanism/textures/blocks/models/SmallTransmitterHorizontalUltimate.png
	src/main/resources/assets/mekanism/textures/blocks/models/SmallTransmitterVerticalAdvanced.png
	src/main/resources/assets/mekanism/textures/blocks/models/SmallTransmitterVerticalBasic.png
	src/main/resources/assets/mekanism/textures/blocks/models/SmallTransmitterVerticalElite.png
	src/main/resources/assets/mekanism/textures/blocks/models/SmallTransmitterVerticalUltimate.png
	src/main/resources/assets/mekanism/textures/blocks/models/multipart/SmallTransmitterHorizontalAdvanced.png
	src/main/resources/assets/mekanism/textures/blocks/models/multipart/SmallTransmitterHorizontalBasic.png
	src/main/resources/assets/mekanism/textures/blocks/models/multipart/SmallTransmitterHorizontalElite.png
	src/main/resources/assets/mekanism/textures/blocks/models/multipart/SmallTransmitterHorizontalUltimate.png
	src/main/resources/assets/mekanism/textures/blocks/models/multipart/SmallTransmitterVerticalAdvanced.png
	src/main/resources/assets/mekanism/textures/blocks/models/multipart/SmallTransmitterVerticalBasic.png
	src/main/resources/assets/mekanism/textures/blocks/models/multipart/SmallTransmitterVerticalElite.png
	src/main/resources/assets/mekanism/textures/blocks/models/multipart/SmallTransmitterVerticalUltimate.png
2016-05-02 23:08:40 -04:00
Ben Spiers 84336ec4d1 Merge branch 'development' into 1.8.9
Huge merge with 202 conflicts, hopefully not *too* broken.
2016-03-18 04:24:19 +00:00
aidancbrady 87438dcc7f Boiler work, added heat info tab, worked on polishing heat interactions among machines 2016-02-27 13:32:48 -05:00
Ben Spiers 4247ba136a Fix compile errors in API package 2016-01-16 14:35:01 +00:00
aidancbrady 2b785c95f3 Transmitters now intelligently maintain buffers when transmitter nodes are destroyed 2015-11-26 15:41:22 -07:00
Ben Spiers d14686ea2e Work on clientsiding, acceptors and things like redstone and multipart blocking. 2015-04-02 03:22:53 +01:00
Ben Spiers 47b4eb28b4 Start on refactor of entire network system.
It will hopefully make networks more robust and efficient, using lessons learned since last time I rewrote large parts of it.
We can hopefully avoid Concurrent Modification issues this way, and it should be more forgiving on chunk loads as well.
Transmitter stuff is working well, next acceptors and client rendering need tobe brought in.
2015-04-01 02:42:36 +01:00
Ben Spiers fab95e8900 Re-organise imports.
I went for what seemed like a good level of organisation:

Java
__________
Mekanism
__________
Minecraft
Forge
FML
__________
Netty
LWJGL
__________
Other APIs
__________
Static Imports.
2014-09-03 19:00:03 +01:00
Aidan C. Brady 377fff30ca We don't really need getLocation(), instead using Coord4D.get() with the getTile() method. 2014-07-09 15:37:43 -04:00
Aidan C. Brady 27295670cc Whoops - fixed crash. Also added recipe for Plenisher. 2014-06-19 14:42:11 +02:00
Aidan C. Brady d9658a16bd Transmitter network efficiency overhaul! Transmitter networks now only refresh acceptors on the transmitter that initiated the refresh instead of resetting the entire grid. 2014-06-19 14:34:57 +02:00
Aidan C. Brady d436c70421 Merge branch 'master' into development
Conflicts:
	build.gradle
	build.properties
	common/mekanism/common/network/PacketPortableTeleport.java
	common/mekanism/tools/common/MekanismTools.java
	etc/core/mcmod.info
	etc/generators/mcmod.info
	etc/tools/mcmod.info
	src/main/java/mekanism/common/EnergyNetwork.java
	src/main/java/mekanism/common/Mekanism.java
	src/main/java/mekanism/common/PacketHandler.java
	src/main/java/mekanism/common/network/PacketTransmitterUpdate.java
	src/main/java/mekanism/common/tile/TileEntityChargepad.java
	src/main/java/mekanism/common/tile/TileEntityEnergyCube.java
	src/main/java/mekanism/common/tile/TileEntityLogisticalSorter.java
	src/main/java/mekanism/generators/common/MekanismGenerators.java
2014-06-08 12:01:08 +02:00
Ben Spiers ab47724473 Move the directory structure around to a more conventional one and start out on the 1.7 update.
3797 errors. We have a long way to go.
2014-04-20 03:44:06 +01:00