Skip to content

Fix/motor render #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 51 commits into
base: 1.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f8a6d51
Finished destruction development for rocket motors
StannisMod Jul 3, 2024
5aea468
Merge remote-tracking branch 'origin/1.12' into 1.12
StannisMod Jul 3, 2024
a3a0dff
-
StannisMod Jul 3, 2024
b019061
Made rocket able to explode on start if there are the broken componen…
StannisMod Jul 3, 2024
c20872a
enable simple tree placement for terraforming
dercodeKoenig Jul 4, 2024
86cfaa2
terraforming update: added heightmap terraforming
dercodeKoenig Jul 6, 2024
67f3d93
fix planets not rotating when space station rotates
dercodeKoenig Jul 6, 2024
debc386
fully implemted heightmap terraforming + safe zone system
dercodeKoenig Jul 6, 2024
db8bff8
fixed some real shitty bugs
dercodeKoenig Jul 7, 2024
827cc8d
bug fixes
dercodeKoenig Jul 7, 2024
9c52d18
The repair recipes
StannisMod Jul 7, 2024
8e71baa
Fixed satellite hatches weighting override
StannisMod Jul 7, 2024
2c9def2
Made rendering for the broken textures
StannisMod Jul 7, 2024
9d88aeb
Merge remote-tracking branch 'origin/1.12' into 1.12
StannisMod Jul 7, 2024
6214dec
more bug fixes and improvements
dercodeKoenig Jul 7, 2024
d1f7c8d
fully repaired mining drill
dercodeKoenig Jul 7, 2024
755cfd2
last bugfix
dercodeKoenig Jul 7, 2024
114829a
and another bugfix
dercodeKoenig Jul 7, 2024
e8d7165
little improvements
dercodeKoenig Jul 7, 2024
bfcf78f
Merge branch '1.12' into terraforming-/drill-update
dercodeKoenig Jul 8, 2024
d7778d3
Merge pull request #22 from dercodeKoenig/terraforming-/drill-update
dercodeKoenig Jul 8, 2024
47ded85
bug fixes and improvements for drill & terraforming
dercodeKoenig Jul 10, 2024
e7ac483
fixed crash on world save
dercodeKoenig Jul 10, 2024
e408f92
Fixed rocket stick in atmosphere, made config entries for all of motors
StannisMod Jul 10, 2024
d9e69ee
Merge remote-tracking branch 'origin/1.12' into 1.12
StannisMod Jul 10, 2024
0b625d4
Extended buildscripts
StannisMod Jul 10, 2024
af4f146
version up to 2.1.1
dercodeKoenig Jul 11, 2024
ecb1a4c
the blockupdate code will no longer be executed from the onAdjacentBl…
dercodeKoenig Jul 11, 2024
5805e12
The great... update
StannisMod Jul 21, 2024
5cba7fc
Service station now working
StannisMod Jul 22, 2024
361c3f6
Pre-finished service station
StannisMod Jul 22, 2024
2e9a1f3
Just a fix
StannisMod Jul 22, 2024
7fefbfe
Fixed stats not changing within repairing process
StannisMod Jul 23, 2024
e5923bc
Fixed service station repairs parts that are not broken
StannisMod Jul 23, 2024
1ddc33f
Fixed ore generation
StannisMod Jul 26, 2024
b30affa
Handled situation assembler invalidates during the repair process
StannisMod Jul 26, 2024
b441209
-
StannisMod Jul 26, 2024
55d95b1
Merge branch 'feature/service_station' into fix/ore_generation
StannisMod Jul 26, 2024
e1a78cd
Fixed not damaging on land
StannisMod Jul 26, 2024
aea5096
fix structure generation crash
dercodeKoenig Jul 28, 2024
c66519a
increased distance to send biome change information to client
dercodeKoenig Jul 28, 2024
db8957b
Merge pull request #23 from dercodeKoenig/feature/service_station
StannisMod Jul 29, 2024
2e8386c
Merge pull request #24 from dercodeKoenig/fix/ore_generation
StannisMod Jul 29, 2024
6b6f5c4
Service station improvements, fixes (#25)
StannisMod Jul 30, 2024
1468149
Updated compat
StannisMod Jul 30, 2024
344fc88
made all tanks rotable + note on missing planet leo bug
dercodeKoenig Jul 30, 2024
a3cd8f8
Merge branch '1.12' of https://github.com/dercodeKoenig/AdvancedRocke…
dercodeKoenig Jul 30, 2024
c01290d
some bugfixes
dercodeKoenig Aug 20, 2024
5764177
make player center on seat in rocket + increase lack hole render dist…
dercodeKoenig Aug 22, 2024
39587b5
Added rotation render for the broken parts
StannisMod Aug 24, 2024
f044e93
Render fixed (now using getActualState() for the real state..)
StannisMod Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ output
# other
eclipse
run
run-server
refresh.bat
AdvancedRocketry.txt
changelog.html
Expand Down
18 changes: 9 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tasks.compileJava {


minecraft {
mappings("snapshot", "20170624-1.12")
mappings("snapshot", "20171003-1.12")

accessTransformer(file("src/main/resources/META-INF/accessTransformer.cfg"))

Expand Down Expand Up @@ -131,10 +131,10 @@ repositories {
name = "ModMaven"
url = uri("https://modmaven.k-4u.nl")
}
maven {
name = "Galacticraft"
url = uri("https://maven.galacticraft.dev/repository/legacy-releases/")
}
//maven {
// name = "Galacticraft"
// url = uri("https://maven.galacticraft.dev/repository/legacy-releases/")
//}
// maven {
// name = "LibVulpes"
// url = uri("http://maven.dmodoomsirius.me/")
Expand All @@ -152,15 +152,15 @@ dependencies {
//compileOnly("net.industrial-craft:industrialcraft-2:$icVersion:dev")
//implementation("zmaster587.libVulpes:LibVulpes:$mcVersion-$libVulpesVersion-$libVulpesBuildNum-deobf")

compileOnly(fg.deobf("dev.galacticraft:galacticraft-legacy:$gcVersion"))

//compileOnly(fg.deobf("dev.galacticraft:galacticraft-legacy:$gcVersion"))
compileOnly(fg.deobf("curse.maven:galacticraft-legacy-564236:4671122"))
compileOnly(fg.deobf("mezz.jei:jei_${mcVersion}:${jeiVersion}:api"))
runtimeOnly(fg.deobf("mezz.jei:jei_${mcVersion}:${jeiVersion}"))
implementation(fg.deobf("mezz.jei:jei_${mcVersion}:${jeiVersion}")) // Sorry but it won't start wihout jei...
//runtimeOnly(fg.deobf("mezz.jei:jei_${mcVersion}:${jeiVersion}")) // I think this crashes the game for me when running from IntelliJ

implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))

implementation ("net.minecraftforge:mergetool:0.2.3.3")
// implementation ("zmaster587.libVulpes:libVulpes:1.12.2-0.4.2+:deobf")
}

tasks.processResources {
Expand Down
6 changes: 2 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ org.gradle.daemon=false
# Project
mcVersion=1.12.2
forgeVersion=14.23.5.2860
modVersion=2.0.11
modVersion=2.1.3
archiveBase=AdvancedRocketry
startGitRev=8e676bd

# Dependencies
libVulpesVersion=0.4.3
libVulpesVersion=0.5.0
jeiVersion=4.16.1.301
icVersion=2.7.39-ex111
gcVersion=4.0.6
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jul 07 14:46:24 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file modified libs/LibVulpes-deobf.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven {
name = "MinecraftForge"
url = uri("https://maven.minecraftforge.net/")
Expand All @@ -9,6 +10,10 @@ pluginManagement {
name = "FancyGradle"
url = uri("https://maven.gofancy.wtf/releases")
}
maven { url = uri("https://plugins.gradle.org/m2/") }
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
}

Expand Down
11 changes: 11 additions & 0 deletions src/main/java/zmaster587/advancedRocketry/AdvancedRocketry.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ public void preInit(FMLPreInitializationEvent event) {

//TileEntity Registration ---------------------------------------------------------------------------------------------
GameRegistry.registerTileEntity(TileBrokenPart.class, "ARbrokenPart");
GameRegistry.registerTileEntity(TileRocketServiceStation.class, "ARserviceStation");
GameRegistry.registerTileEntity(TileRocketAssemblingMachine.class, "ARrocketBuilder");
GameRegistry.registerTileEntity(TileWarpCore.class, "ARwarpCore");
//GameRegistry.registerTileEntity(TileModelRender.class, "ARmodelRenderer");
Expand Down Expand Up @@ -590,6 +591,12 @@ public void registerItems(RegistryEvent.Register<Item> evt) {
OreDictionary.registerOre("slab", new ItemStack(Blocks.STONE_SLAB));
OreDictionary.registerOre("blockWarpCoreCore", new ItemStack(Blocks.GOLD_BLOCK));
OreDictionary.registerOre("blockWarpCoreRim", MaterialRegistry.getMaterialFromName("Titanium").getProduct(AllowedProducts.getProductByName("BLOCK")));

Item.getItemFromBlock(AdvancedRocketryBlocks.blockEngine).setMaxDamage(10);
Item.getItemFromBlock(AdvancedRocketryBlocks.blockAdvEngine).setMaxDamage(10);
Item.getItemFromBlock(AdvancedRocketryBlocks.blockBipropellantEngine).setMaxDamage(10);
Item.getItemFromBlock(AdvancedRocketryBlocks.blockAdvBipropellantEngine).setMaxDamage(10);
Item.getItemFromBlock(AdvancedRocketryBlocks.blockNuclearEngine).setMaxDamage(10);
}

@SubscribeEvent(priority = EventPriority.HIGH)
Expand Down Expand Up @@ -668,6 +675,7 @@ public void registerBlocks(RegistryEvent.Register<Block> evt) {
AdvancedRocketryBlocks.blockIntake = new BlockIntake(Material.IRON).setUnlocalizedName("gasIntake").setCreativeTab(tabAdvRocketry).setHardness(3f);
AdvancedRocketryBlocks.blockDrill = new BlockMiningDrill().setUnlocalizedName("drill").setCreativeTab(tabAdvRocketry).setHardness(3f);
AdvancedRocketryBlocks.blockLandingFloat = new Block(Material.IRON).setUnlocalizedName("landingfloat").setCreativeTab(tabAdvRocketry).setHardness(1).setResistance(1f);
AdvancedRocketryBlocks.blockServiceMonitor = new Block(Material.IRON).setUnlocalizedName("servicemonitor").setCreativeTab(tabAdvRocketry).setHardness(1).setResistance(1f);
//Assembly machines
AdvancedRocketryBlocks.blockRocketBuilder = new BlockTileWithMultitooltip(TileRocketAssemblingMachine.class, GuiHandler.guiId.MODULARNOINV.ordinal()).setUnlocalizedName("rocketAssembler").setCreativeTab(tabAdvRocketry).setHardness(3f);
AdvancedRocketryBlocks.blockStationBuilder = new BlockTileWithMultitooltip(TileStationAssembler.class, GuiHandler.guiId.MODULAR.ordinal()).setUnlocalizedName("stationAssembler").setCreativeTab(tabAdvRocketry).setHardness(3f);
Expand All @@ -678,6 +686,7 @@ public void registerBlocks(RegistryEvent.Register<Block> evt) {
AdvancedRocketryBlocks.blockMonitoringStation = new BlockTileNeighborUpdate(TileRocketMonitoringStation.class, GuiHandler.guiId.MODULARNOINV.ordinal()).setCreativeTab(tabAdvRocketry).setHardness(3f).setUnlocalizedName("monitoringstation");
AdvancedRocketryBlocks.blockSatelliteControlCenter = new BlockTile(TileSatelliteTerminal.class, GuiHandler.guiId.MODULAR.ordinal()).setCreativeTab(tabAdvRocketry).setHardness(3f).setUnlocalizedName("satelliteMonitor");
AdvancedRocketryBlocks.blockTerraformingTerminal = new BlockTileTerraformer(TileTerraformingTerminal.class, GuiHandler.guiId.MODULAR.ordinal()).setCreativeTab(tabAdvRocketry).setHardness(3f).setUnlocalizedName("terraformingTerminal");
AdvancedRocketryBlocks.blockServiceStation = new BlockTile(TileRocketServiceStation.class, GuiHandler.guiId.MODULARNOINV.ordinal()).setCreativeTab(tabAdvRocketry).setHardness(3f).setUnlocalizedName("serviceStation");

//Station machines
AdvancedRocketryBlocks.blockWarpShipMonitor = new BlockWarpController(TileWarpController.class, GuiHandler.guiId.MODULARNOINV.ordinal()).setCreativeTab(tabAdvRocketry).setHardness(3f).setUnlocalizedName("stationmonitor");
Expand Down Expand Up @@ -838,12 +847,14 @@ public void registerBlocks(RegistryEvent.Register<Block> evt) {
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockIntake.setRegistryName("intake"));
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockDrill.setRegistryName("drill"));
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockLandingFloat.setRegistryName("landingfloat"));
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockServiceMonitor.setRegistryName("servicemonitor"));
//Assembly machines
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockRocketBuilder.setRegistryName("rocketBuilder"));
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockStationBuilder.setRegistryName("stationBuilder"));
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockDeployableRocketBuilder.setRegistryName("deployableRocketBuilder"));
//Infrastructure machines
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockLoader.setRegistryName("loader"), ItemBlockMeta.class, false);
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockServiceStation.setRegistryName("serviceStation"));
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockFuelingStation.setRegistryName("fuelingStation"));
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockMonitoringStation.setRegistryName("monitoringStation"));
LibVulpesBlocks.registerBlock(AdvancedRocketryBlocks.blockSatelliteControlCenter.setRegistryName("satelliteControlCenter"));
Expand Down
20 changes: 16 additions & 4 deletions src/main/java/zmaster587/advancedRocketry/api/ARConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ public class ARConfiguration {
@ConfigProperty
public int planetDiscoveryChance;
@ConfigProperty
public boolean allowNonArBiomesInTerraforming;
@ConfigProperty
public double oxygenVentPowerMultiplier;
@ConfigProperty
public boolean skyOverride;
Expand Down Expand Up @@ -272,15 +274,21 @@ public class ARConfiguration {
@ConfigProperty(needsSync = true)
public boolean experimentalSpaceFlight;

public ARConfiguration() {
@ConfigProperty
public boolean advancedWeightSystem;

}
@ConfigProperty
public boolean partsWearSystem;

@ConfigProperty
public double increaseWearIntensityProb;

public ARConfiguration() {}

public ARConfiguration(ARConfiguration config) {
Field[] fields = ARConfiguration.class.getDeclaredFields();
List<Field> fieldList = new ArrayList<>(fields.length);


// getDeclaredFields returns an unordered list, so we need to sort them
for (Field field : fields) {
if (field.isAnnotationPresent(ConfigProperty.class))
Expand Down Expand Up @@ -355,7 +363,7 @@ public static void loadPreInit() {
arConfig.crystalliserMaximumGravity = (float) config.get(Configuration.CATEGORY_GENERAL, "crystalliserMaximumGravity", 0f, "Maximum gravity the crystalliser will function at. Use 0.0 to disable!").getDouble();
arConfig.enableLaserDrill = config.get(Configuration.CATEGORY_GENERAL, "EnableLaserDrill", true, "Enables the laser drill machine").getBoolean();
arConfig.spaceLaserPowerMult = (float) config.get(Configuration.CATEGORY_GENERAL, "LaserDrillPowerMultiplier", 1d, "Power multiplier for the laser drill machine").getDouble();
arConfig.laserDrillPlanet = config.get(Configuration.CATEGORY_GENERAL, "laserDrillPlanet", false, "If true the orbital laser will actually mine blocks on the planet below (currently not working)").getBoolean();
arConfig.laserDrillPlanet = config.get(Configuration.CATEGORY_GENERAL, "laserDrillPlanet", false, "If true the orbital laser will actually mine blocks on the planet below").getBoolean();
String[] str = config.getStringList("spaceLaserDimIdBlackList", Configuration.CATEGORY_GENERAL, new String[]{}, "Laser drill will not mine these dimension");
arConfig.enableTerraforming = config.get(Configuration.CATEGORY_GENERAL, "EnableTerraforming", true, "Enables terraforming items and blocks").getBoolean();
arConfig.terraformSpeed = config.get(Configuration.CATEGORY_GENERAL, "terraformMult", 1f, "Multplier for atmosphere change speed").getDouble();
Expand All @@ -364,6 +372,7 @@ public static void loadPreInit() {
arConfig.terraformliquidRate = config.get(Configuration.CATEGORY_GENERAL, "TerraformerFluidConsumeRate", 40, "how many millibuckets/t are required to keep the terraformer running").getInt();
arConfig.allowTerraformNonAR = config.get(Configuration.CATEGORY_GENERAL, "allowTerraformingNonARWorlds", false, "If true dimensions not added by AR can be terraformed, including the overworld").getBoolean();
arConfig.enableGravityController = config.get(Configuration.CATEGORY_GENERAL, "enableGravityMachine", true, "If false the gravity controller cannot be built or used").getBoolean();
arConfig.allowNonArBiomesInTerraforming = config.get(Configuration.CATEGORY_GENERAL, "allowNonArBiomesInTerraforming", false, "non-ar biomes from mods with custom world gen can not be decorated in terraforming. If you want fully decorated terraforming with only default biomes, set this to false").getBoolean();

//Oxygen
arConfig.enableOxygen = config.get(OXYGEN, "EnableAtmosphericEffects", true, "If true, allows players being hurt due to lack of oxygen and allows effects from non-standard atmosphere types").getBoolean();
Expand Down Expand Up @@ -446,6 +455,9 @@ public static void loadPreInit() {
arConfig.gravityAffectsFuel = config.get(ROCKET, "gravityAffectsFuels", true, "If true planets with higher gravity require more fuel and lower gravity would require less").getBoolean();
arConfig.launchingDestroysBlocks = config.get(ROCKET, "launchBlockDestruction", false, "If true rocket launches will kill plants, glass soil, turn rock into lava, and more").getBoolean();
blackListRocketBlocksStr = config.getStringList("rocketBlockBlackList", ROCKET, new String[]{"minecraft:portal", "minecraft:bedrock", "minecraft:snow_layer", "minecraft:water", "minecraft:flowing_water", "minecraft:lava", "minecraft:flowing_lava", "minecraft:fire", "advancedrocketry:rocketfire"}, "Mod:Blockname for example \"minecraft:chest\"");
arConfig.advancedWeightSystem = config.get(ROCKET, "advancedWeightSystem", true, "Enables advanced weight system which computes rocket weight, including the handled inventories. Block weights are stores in weights.json").getBoolean();
arConfig.partsWearSystem = config.get(ROCKET, "partsWearSystem", true, "Enables rocket parts wear subsystem. Every rocket start it has probability to explode based on parts' wear intensities").getBoolean();
arConfig.increaseWearIntensityProb = config.get(ROCKET, "increaseWearIntensityProb", 0.025, "Every rocket usage every part has this probability to increase wear intensity").getDouble();

//Ore and worldgen configuration
//Ore configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class AdvancedRocketryBlocks {
public static Block blockBipropellantFuelTank;
public static Block blockOxidizerFuelTank;
public static Block blockFuelingStation;
public static Block blockServiceStation;
public static Block blockMonitoringStation, blockSatelliteBuilder, blockSatelliteControlCenter;
public static Block blockNuclearFuelTank;
public static Block blockMoonTurf, blockHotTurf;
Expand Down Expand Up @@ -106,4 +107,5 @@ public class AdvancedRocketryBlocks {
public static Block blockSolarArray;
public static Block blockSolarArrayPanel;
public static Block blockRocketFire;
public static Block blockServiceMonitor;
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public static SatelliteProperties getSatelliteProperties(@Nonnull ItemStack stac

if (nbt != null) {
if (stack.getItem() instanceof ItemSatellite) {
SatelliteProperties properties = new SatelliteProperties(nbt.getInteger("powerGeneration"), nbt.getInteger("powerStorage"), nbt.getString("dataType"), nbt.getInteger("maxData"));
SatelliteProperties properties = new SatelliteProperties(nbt.getInteger("powerGeneration"), nbt.getInteger("powerStorage"), nbt.getString("dataType"), nbt.getInteger("maxData"), nbt.getFloat("weight"));
properties.setId(SatelliteRegistry.getSatelliteId(stack));
return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ public class SatelliteProperties implements IWeighted {
private int powerGeneration, powerStorage, maxData;
private long id;
private String satType;
private float weight;

public SatelliteProperties() {
satType = null;
id = -1;
}

public SatelliteProperties(int powerGeneration, int powerStorage, String satType, int maxData) {
public SatelliteProperties(int powerGeneration, int powerStorage, String satType, int maxData, float weight) {
this();
this.powerGeneration = powerGeneration;
this.powerStorage = powerStorage;
this.satType = satType;
this.maxData = maxData;
this.weight = weight;
}

/**
Expand Down Expand Up @@ -79,7 +82,7 @@ public SatelliteProperties setPowerGeneration(int powerGeneration) {
}

public float getWeight() {
return 50 + getPowerStorage() * 0.1F + getPowerGeneration() * 0.2F + getMaxDataStorage() * 0.01F;
return this.weight;
}

/**
Expand Down Expand Up @@ -136,6 +139,7 @@ public void writeToNBT(NBTTagCompound nbt) {
nbt.setString("dataType", satType);
nbt.setLong("satId", id);
nbt.setInteger("maxData", maxData);
nbt.setFloat("weight", weight);
}

public void readFromNBT(NBTTagCompound nbt) {
Expand All @@ -144,6 +148,7 @@ public void readFromNBT(NBTTagCompound nbt) {
satType = nbt.getString("dataType");
id = nbt.getLong("satId");
maxData = nbt.getInteger("maxData");
weight = nbt.getFloat("weight");
}

public enum Property {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public static void onBlockChange(@Nonnull World world, @Nonnull BlockPos bpos) {
}


// sure.. causes stackoverflow left right center
/*
else if (!handler.getAtmosphereType(bpos).allowsCombustion()) {
if (world.getBlockState(bpos).getBlock().isLeaves(world.getBlockState(bpos), world, bpos)) {
if (!(Boolean)world.getBlockState(bpos).getValue(BlockLeaves.CHECK_DECAY)) {
Expand All @@ -152,6 +154,7 @@ else if (!handler.getAtmosphereType(bpos).allowsCombustion()) {
world.setBlockState(bpos, Blocks.DIRT.getDefaultState());
}
}
*/

//Gasses should automatically vaporize and dissipate
if (handler.getAtmosphereType(bpos) == AtmosphereType.VACUUM) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
package zmaster587.advancedRocketry.block;

import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import zmaster587.advancedRocketry.api.ARConfiguration;
import zmaster587.advancedRocketry.tile.TileBrokenPart;

import javax.annotation.Nullable;

public class BlockAdvancedBipropellantRocketMotor extends BlockBipropellantRocketMotor {

Expand All @@ -19,4 +25,10 @@ public int getThrust(World world, BlockPos pos) {
public int getFuelConsumptionRate(World world, int x, int y, int z) {
return 3;
}

@Nullable
@Override
public TileEntity createTileEntity(final World worldIn, final IBlockState state) {
return new TileBrokenPart(10, (float) ARConfiguration.getCurrentConfig().increaseWearIntensityProb);
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
package zmaster587.advancedRocketry.block;

import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import zmaster587.advancedRocketry.api.ARConfiguration;
import zmaster587.advancedRocketry.tile.TileBrokenPart;

import javax.annotation.Nullable;

public class BlockAdvancedRocketMotor extends BlockRocketMotor {

Expand All @@ -19,4 +25,10 @@ public int getThrust(World world, BlockPos pos) {
public int getFuelConsumptionRate(World world, int x, int y, int z) {
return 3;
}

@Nullable
@Override
public TileEntity createTileEntity(final World worldIn, final IBlockState state) {
return new TileBrokenPart(10, (float) ARConfiguration.getCurrentConfig().increaseWearIntensityProb);
}
}
Loading