Skip to content

Commit

Permalink
Fix copper particle crash, added another wax to copper
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 committed Jul 12, 2021
1 parent 84d0ada commit df42b2a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'forge'
// SEMVER that gradle uses.
group = "ganymedes01.etfuturum"
archivesBaseName = "Et_Futurum_Requiem"
version = "2.2.0"
version = "2.2.1"

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/ganymedes01/etfuturum/blocks/IDegradable.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ default boolean tryWaxOnWaxOff(World world, int x, int y, int z, EntityPlayer en
ItemStack heldStack = entityPlayer.getCurrentEquippedItem();
if(meta < 8) {
for(int oreID : OreDictionary.getOreIDs(heldStack)) {
if((OreDictionary.doesOreNameExist("materialWax") || OreDictionary.doesOreNameExist("materialWaxcomb")) || OreDictionary.doesOreNameExist("itemBeeswax") ?
OreDictionary.getOreName(oreID).equals("materialWax") || OreDictionary.getOreName(oreID).equals("materialWaxcomb") || OreDictionary.getOreName(oreID).equals("itemBeeswax") :
if((OreDictionary.doesOreNameExist("materialWax") || OreDictionary.doesOreNameExist("materialWaxcomb"))
|| OreDictionary.doesOreNameExist("materialHoneycomb") || OreDictionary.doesOreNameExist("itemBeeswax") ?
OreDictionary.getOreName(oreID).equals("materialWax") || OreDictionary.getOreName(oreID).equals("materialWaxcomb") ||
OreDictionary.getOreName(oreID).equals("materialHoneycomb") || OreDictionary.getOreName(oreID).equals("itemBeeswax") :
OreDictionary.getOreName(oreID).equals("slimeball")) {
flag = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ public class CopperGlowFX extends EtFuturumFXParticle {
public CopperGlowFX(World world, double x, double y, double z, double mx, double my, double mz, int maxAge,
float scale, int color, ResourceLocation texture, int textures) {
super(world, x, y, z, 0, 0, 0, maxAge, scale, color, texture, textures);
//Cannot divide by 0 (divideByZeroException), so in the unlikely event nextDouble outputs zero, don't divide and just put 0 as the result.
double xrand = particleRand.nextDouble();
double yrand = particleRand.nextDouble();
double zrand = particleRand.nextDouble();
motionX = (xrand == 0.0D ? 0D : (xrand / 100D)) - 0.005D;
motionY = (yrand == 0.0D ? 0D : (yrand / 100D)) - 0.005D;
motionZ = (zrand == 0.0D ? 0D : (zrand / 100D)) - 0.005D;
motionX = (xrand * 0.01D) - 0.005D;
motionY = (yrand * 0.01D) - 0.005D;
motionZ = (zrand * 0.01D) - 0.005D;
this.particleGravity = 0;
this.noClip = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public ConfigGUI(GuiScreen parent) {

private static List<IConfigElement> getElements() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
for (String category : ConfigBase.usedCategories)
list.add(new ConfigElement(ConfigBase.INSTANCE.cfg.getCategory(category)));
// for (String category : ConfigBase.usedCategories)
// list.add(new ConfigElement(ConfigBase.INSTANCE.cfg.getCategory(category)));
return list;
}
}
6 changes: 5 additions & 1 deletion src/main/java/ganymedes01/etfuturum/recipes/ModRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -693,17 +693,21 @@ private static void registerRecipes() {
addShapedRecipe(new ItemStack(ModBlocks.cut_copper_slab, 6, i), "xxx", 'x', new ItemStack(ModBlocks.copper_block, 1, j + 4));
addShapedRecipe(new ItemStack(stairs[i], 4), "x ", "xx ", "xxx", 'x', new ItemStack(ModBlocks.copper_block, 1, j + 4));
}
if(OreDictionary.doesOreNameExist("materialWax") || OreDictionary.doesOreNameExist("materialWaxcomb") || OreDictionary.doesOreNameExist("itemBeeswax")) {
if(OreDictionary.doesOreNameExist("materialWax") || OreDictionary.doesOreNameExist("materialWaxcomb") ||
OreDictionary.doesOreNameExist("materialHoneycomb") || OreDictionary.doesOreNameExist("itemBeeswax")) {
addShapelessRecipe(new ItemStack(ModBlocks.copper_block, 1, i + 8), "itemBeeswax", new ItemStack(ModBlocks.copper_block, 1, i));
addShapelessRecipe(new ItemStack(ModBlocks.copper_block, 1, i + 8), "materialWax", new ItemStack(ModBlocks.copper_block, 1, i));
addShapelessRecipe(new ItemStack(ModBlocks.copper_block, 1, i + 8), "materialWaxcomb", new ItemStack(ModBlocks.copper_block, 1, i));
addShapelessRecipe(new ItemStack(ModBlocks.copper_block, 1, i + 8), "materialHoneycomb", new ItemStack(ModBlocks.copper_block, 1, i));
if(i > 3) {
addShapelessRecipe(new ItemStack(ModBlocks.cut_copper_slab, 1, i), "itemBeeswax", new ItemStack(ModBlocks.cut_copper_slab, 1, i - 4));
addShapelessRecipe(new ItemStack(ModBlocks.cut_copper_slab, 1, i), "materialWax", new ItemStack(ModBlocks.cut_copper_slab, 1, i - 4));
addShapelessRecipe(new ItemStack(ModBlocks.cut_copper_slab, 1, i), "materialWaxcomb", new ItemStack(ModBlocks.cut_copper_slab, 1, i - 4));
addShapelessRecipe(new ItemStack(ModBlocks.cut_copper_slab, 1, i), "materialHoneycomb", new ItemStack(ModBlocks.cut_copper_slab, 1, i - 4));
addShapelessRecipe(new ItemStack(stairs[i], 1), "itemBeeswax", new ItemStack(stairs[i - 4], 1));
addShapelessRecipe(new ItemStack(stairs[i], 1), "materialWax", new ItemStack(stairs[i - 4], 1));
addShapelessRecipe(new ItemStack(stairs[i], 1), "materialWaxcomb", new ItemStack(stairs[i - 4], 1));
addShapelessRecipe(new ItemStack(stairs[i], 1), "materialHoneycomb", new ItemStack(stairs[i - 4], 1));
}
} else {
addShapelessRecipe(new ItemStack(ModBlocks.copper_block, 1, i + 8), "slimeball", new ItemStack(ModBlocks.copper_block, 1, i));
Expand Down

0 comments on commit df42b2a

Please sign in to comment.