diff --git a/build.gradle b/build.gradle index 9c495c27fb..fe2ca0f249 100644 --- a/build.gradle +++ b/build.gradle @@ -96,14 +96,16 @@ dependencies { runtimeOnly fg.deobf("vazkii.botania:Botania:${botania_version}") // optional dependencies & mods for testing compat - +/* implementation fg.deobf("curse.maven:mantle-74924:3482897") implementation fg.deobf("curse.maven:tinkers-construct-74072:3482903") implementation fg.deobf("curse.maven:cucumber-272335:3507886") implementation fg.deobf("curse.maven:mystical-agriculture-246640:3562127") implementation fg.deobf("curse.maven:chunknogobyebye-332695:3195333") - - + implementation fg.deobf("curse.maven:yungs-api-421850:3494919") + implementation fg.deobf("curse.maven:yungs-better-strongholds-465575:3412586") + implementation fg.deobf("curse.maven:v-tweaks-238048:3675562") +*/ // To use any mod in /libs/ folder, place it in and set the mod and version to match jar filename // runtimeOnly fg.deobf("libs:SimpleStorageNetwork:1.16.4-1.3.1") // runtimeOnly fg.deobf("libs:refinedstorage:1.16.4-1.9.11") diff --git a/examples/scripts/durability.zs b/examples/scripts/durability.zs new file mode 100644 index 0000000000..4c5258d034 --- /dev/null +++ b/examples/scripts/durability.zs @@ -0,0 +1,10 @@ + + +// change max damage aka durability aka number of tool uses like this + +val glove = ; +glove.maxDamage = 64; + + +val wand = ; +wand.maxDamage = 16; diff --git a/examples/scripts/generator_fluid.zs b/examples/scripts/generator_fluid.zs new file mode 100644 index 0000000000..dbdeb34f2f --- /dev/null +++ b/examples/scripts/generator_fluid.zs @@ -0,0 +1,14 @@ +// https://docs.blamejared.com/ +// https://www.curseforge.com/minecraft/mc-mods/crafttweaker +// use /ct dump fluids to see all fluid IDs + +var generator = ; + +generator.removeRecipe("cyclic:generator/generate_xp"); +generator.removeRecipe("cyclic:generator/generate_lava"); + + + +generator.addRecipe("zoldo", *250, 5, 10); + +generator.addRecipe("lava_tag", "minecraft:lava", 1000, 200, 500); diff --git a/examples/scripts/generator_item.zs b/examples/scripts/generator_item.zs new file mode 100644 index 0000000000..33c62da670 --- /dev/null +++ b/examples/scripts/generator_item.zs @@ -0,0 +1,12 @@ +// https://docs.blamejared.com/ +// https://www.curseforge.com/minecraft/mc-mods/crafttweaker +// use /ct dump fluids to see all fluid IDs + +var generator = ; + +// recipe IDS, not item ids +generator.removeRecipe("cyclic:generator/generate_redstone"); +generator.removeRecipe("cyclic:generator/generate_star"); + +// ID, input, output, RF per tick, ticks, bonus, percentage of bonus +generator.addRecipe("zelda", , 500, 120); diff --git a/src/main/java/com/lothrazar/cyclic/block/breaker/TileBreaker.java b/src/main/java/com/lothrazar/cyclic/block/breaker/TileBreaker.java index c596ae1e34..ea4872763f 100644 --- a/src/main/java/com/lothrazar/cyclic/block/breaker/TileBreaker.java +++ b/src/main/java/com/lothrazar/cyclic/block/breaker/TileBreaker.java @@ -9,10 +9,12 @@ import net.minecraft.inventory.container.Container; import net.minecraft.inventory.container.INamedContainerProvider; import net.minecraft.nbt.CompoundNBT; +import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; +import net.minecraft.world.World; public class TileBreaker extends TileEntityBase implements INamedContainerProvider, ITickableTileEntity { @@ -41,25 +43,32 @@ public void tick() { return; } BlockPos target = pos.offset(this.getCurrentFacing()); - BlockState state = world.getBlockState(target); - if (state.getBlock() != Blocks.AIR && - state.getBlockHardness(world, target) >= 0) { + if (this.isValid(target)) { this.world.destroyBlock(target, true); - // int cost = POWERCONF.get(); - // ModCyclic.LOGGER.info("cost" + cost + " have " + energy.getEnergyStored()); - // if (cost > 0) { - // energy.extractEnergy(cost, false); - // } } - //else unbreakable } - // @Override - // public LazyOptional getCapability(Capability cap, Direction side) { - // if (cap == CapabilityEnergy.ENERGY && POWERCONF.get() > 0) { - // return energyCap.cast(); - // } - // return super.getCapability(cap, side); - // } + + /** + * Avoid mining source liquid blocks and unbreakable + */ + private boolean isValid(BlockPos target) { + World level = world; + BlockState state = level.getBlockState(target); + if (state.getBlock() == Blocks.AIR) { + return false; + } + if (state.getBlockHardness(level, target) < 0) { + return false; + } + if (state.getFluidState() != null && state.getFluidState().isEmpty() == false) { + //am i a solid waterlogged state block? + if (state.hasProperty(BlockStateProperties.WATERLOGGED) == false) { + //pure liquid. but this will make canHarvestBlock go true + return false; + } + } + return true; + } @Override public ITextComponent getDisplayName() { diff --git a/src/main/java/com/lothrazar/cyclic/compat/CompatConstants.java b/src/main/java/com/lothrazar/cyclic/compat/CompatConstants.java index d2ff8fdde3..1e10683012 100644 --- a/src/main/java/com/lothrazar/cyclic/compat/CompatConstants.java +++ b/src/main/java/com/lothrazar/cyclic/compat/CompatConstants.java @@ -1,4 +1,7 @@ package com.lothrazar.cyclic.compat; + +import net.minecraft.util.ResourceLocation; + public class CompatConstants { public static final String RESYNTH_GROWTH_STAGE = "growth_stage"; @@ -6,4 +9,13 @@ public class CompatConstants { public static final String CRAFTTWEAKER = "crafttweaker"; public static final String CURIOS = "curios"; public static final String TCONSTRUCT = "tconstruct"; + // + //compat with Repurposed Structures Mod see #1517 + public static final String RS_MODID = "repurposed_structures"; + public static final String RS_STRONGHOLD_ID = "stronghold_stonebrick"; + public static final String RS_NETHER_STRONGHOLD_ID = "stronghold_nether"; + public static final String YUSTRONG_MODID = "betterstrongholds"; // https://github.com/yungnickyoung/YUNGs-Better-Strongholds + public static final ResourceLocation RS_RESOURCE_LOCATION = new ResourceLocation(RS_MODID, RS_STRONGHOLD_ID); + public static final ResourceLocation RS_NETHER_RESOURCE_LOCATION = new ResourceLocation(RS_MODID, RS_NETHER_STRONGHOLD_ID); + public static final ResourceLocation YUNG_STRONGHOLD_LOCATION = new ResourceLocation(YUSTRONG_MODID, "stronghold"); } diff --git a/src/main/java/com/lothrazar/cyclic/compat/botania/BotaniaWrapper.java b/src/main/java/com/lothrazar/cyclic/compat/botania/BotaniaWrapper.java index 3638790abc..1a5cb5ac6a 100644 --- a/src/main/java/com/lothrazar/cyclic/compat/botania/BotaniaWrapper.java +++ b/src/main/java/com/lothrazar/cyclic/compat/botania/BotaniaWrapper.java @@ -5,14 +5,19 @@ public class BotaniaWrapper { + /** + * If the botania mod is loaded, use the botania-api to check for hasSolegnoliaAround(entity); otherwise return false + * + * @param entity + * @return true if botania has found a solegnolia around the entity + */ public static boolean hasSolegnoliaAround(LivingEntity entity) { try { - return ModList.get().isLoaded("botania") && vazkii.botania.api.BotaniaAPI.instance().hasSolegnoliaAround(entity); + if (ModList.get().isLoaded("botania")) { + return vazkii.botania.api.BotaniaAPI.instance().hasSolegnoliaAround(entity); + } } - catch (Exception e) { - //ive never seen an exception here yet, just being safe - } - //either botania does not exist or an error was thrown + catch (Exception e) {} return false; } } diff --git a/src/main/java/com/lothrazar/cyclic/compat/crafttweaker/EnergyFluidZen.java b/src/main/java/com/lothrazar/cyclic/compat/crafttweaker/EnergyFluidZen.java new file mode 100644 index 0000000000..fd84f61a91 --- /dev/null +++ b/src/main/java/com/lothrazar/cyclic/compat/crafttweaker/EnergyFluidZen.java @@ -0,0 +1,57 @@ +package com.lothrazar.cyclic.compat.crafttweaker; + +import com.blamejared.crafttweaker.api.CraftTweakerAPI; +import com.blamejared.crafttweaker.api.annotations.ZenRegister; +import com.blamejared.crafttweaker.api.fluid.IFluidStack; +import com.blamejared.crafttweaker.api.managers.IRecipeManager; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; +import com.lothrazar.cyclic.block.generatorfluid.RecipeGeneratorFluid; +import com.lothrazar.cyclic.compat.CompatConstants; +import com.lothrazar.cyclic.recipe.CyclicRecipeType; +import com.lothrazar.cyclic.recipe.FluidTagIngredient; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidStack; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.openzen.zencode.java.ZenCodeType; + +@ZenRegister +@ZenCodeType.Name("mods.cyclic.generator_fluid") +public class EnergyFluidZen implements IRecipeManager { + + private final Logger logger = LogManager.getLogger(); + + @Override + public IRecipeType getRecipeType() { + return CyclicRecipeType.GENERATOR_FLUID; + } + + @SuppressWarnings("rawtypes") + @ZenCodeType.Method + public void addRecipe(String name, IFluidStack fluid, int rfPertick, int ticks) { + name = fixRecipeName(name); + RecipeGeneratorFluid m = new RecipeGeneratorFluid(new ResourceLocation(CompatConstants.CRAFTTWEAKER, name), + new FluidTagIngredient(new FluidStack(fluid.getFluid(), 1), "", fluid.getAmount()), + ticks, rfPertick); + CraftTweakerAPI.apply(new ActionAddRecipe(this, m, "")); + logger.debug("Recipe loaded " + m.getId().toString()); + } + + @SuppressWarnings("rawtypes") + @ZenCodeType.Method + public void addRecipe(String name, String fluidTag, int amount, int rfPertick, int ticks) { + name = fixRecipeName(name); + RecipeGeneratorFluid m = new RecipeGeneratorFluid(new ResourceLocation(CompatConstants.CRAFTTWEAKER, name), + new FluidTagIngredient(null, fluidTag, amount), + ticks, rfPertick); + CraftTweakerAPI.apply(new ActionAddRecipe(this, m, "")); + logger.debug("Recipe (tag %s) loaded " + m.getId().toString(), fluidTag); + } + + @ZenCodeType.Method + public void removeRecipe(String names) { + removeByName(names); + logger.debug("Recipe removed " + names); + } +} diff --git a/src/main/java/com/lothrazar/cyclic/compat/crafttweaker/EnergyItemZen.java b/src/main/java/com/lothrazar/cyclic/compat/crafttweaker/EnergyItemZen.java new file mode 100644 index 0000000000..fdf11b3a19 --- /dev/null +++ b/src/main/java/com/lothrazar/cyclic/compat/crafttweaker/EnergyItemZen.java @@ -0,0 +1,42 @@ +package com.lothrazar.cyclic.compat.crafttweaker; + +import com.blamejared.crafttweaker.api.CraftTweakerAPI; +import com.blamejared.crafttweaker.api.annotations.ZenRegister; +import com.blamejared.crafttweaker.api.item.IIngredient; +import com.blamejared.crafttweaker.api.managers.IRecipeManager; +import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; +import com.lothrazar.cyclic.block.generatoritem.RecipeGeneratorItem; +import com.lothrazar.cyclic.compat.CompatConstants; +import com.lothrazar.cyclic.recipe.CyclicRecipeType; +import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.util.ResourceLocation; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.openzen.zencode.java.ZenCodeType; + +@ZenRegister +@ZenCodeType.Name("mods.cyclic.generator_item") +public class EnergyItemZen implements IRecipeManager { + + private final Logger logger = LogManager.getLogger(); + + @Override + public IRecipeType getRecipeType() { + return CyclicRecipeType.GENERATOR_ITEM; + } + + @SuppressWarnings("rawtypes") + @ZenCodeType.Method + public void addRecipe(String name, IIngredient input, int rfPertick, int ticks) { + name = fixRecipeName(name); + RecipeGeneratorItem m = new RecipeGeneratorItem(new ResourceLocation(CompatConstants.CRAFTTWEAKER, name), input.asVanillaIngredient(), ticks, rfPertick); + CraftTweakerAPI.apply(new ActionAddRecipe(this, m, "")); + logger.debug("Recipe loaded " + m.getId().toString()); + } + + @ZenCodeType.Method + public void removeRecipe(String names) { + removeByName(names); + logger.debug("Recipe removed " + names); + } +} diff --git a/src/main/java/com/lothrazar/cyclic/config/ConfigRegistry.java b/src/main/java/com/lothrazar/cyclic/config/ConfigRegistry.java index e40da7f8a7..b28a5f4ca3 100644 --- a/src/main/java/com/lothrazar/cyclic/config/ConfigRegistry.java +++ b/src/main/java/com/lothrazar/cyclic/config/ConfigRegistry.java @@ -260,11 +260,11 @@ private static void initConfig() { .defineInRange("generator_food.rf_per_tick", 60, 1, 6400); TileGeneratorFood.TICKS_PER_FOOD = CFG.comment("This [factor * (item.food + item.saturation) = ticks] results in the number of ticks food will burn at. IE Bread has (5 + 0.6) with factor 100, will burn for 560 ticks.") .defineInRange("generator_food.ticks_per_food", 100, 1, 6400); - CFG.comment(WALL, "Energy cost for various machines, either per use of an action or per tick (twenty ticks per second).", WALL) + CFG.comment(WALL, "Energy cost for various machines, either per use of an action or per tick (twenty ticks per second). Setting as zero (0) lets machine run for free", WALL) .push("cost"); TilePackager.POWERCONF = CFG.comment("Power per recipe in the packager").defineInRange("packager", 50, 0, 64000); TileDisenchant.POWERCONF = CFG.comment("Power per use disenchanter").defineInRange("disenchanter", 2500, 0, 64000); - TileUser.POWERCONF = CFG.comment("Power per use user").defineInRange("user", 50, 0, 64000); + TileUser.POWERCONF = CFG.comment("Power per use user").defineInRange("user", 0, 0, 64000); TileAnvilAuto.POWERCONF = CFG.comment("Power per repair anvil").defineInRange("anvil", 250, 0, 64000); TileMelter.POWERCONF = CFG.comment("Power per recipe melter").defineInRange("melter", 5000, 0, 64000); TileSolidifier.POWERCONF = CFG.comment("Power per recipe solidifier").defineInRange("solidifier", 5000, 0, 64000); diff --git a/src/main/java/com/lothrazar/cyclic/event/EventRender.java b/src/main/java/com/lothrazar/cyclic/event/EventRender.java index 86cb1f2d17..18edd1c196 100644 --- a/src/main/java/com/lothrazar/cyclic/event/EventRender.java +++ b/src/main/java/com/lothrazar/cyclic/event/EventRender.java @@ -121,6 +121,7 @@ public static void drawStack(ItemStack stack) { // } ///////////////////// asdfasdf TODO REFACTOR THIS + @SuppressWarnings("deprecation") @SubscribeEvent public void renderOverlay(RenderWorldLastEvent event) { PlayerEntity player = Minecraft.getInstance().player; @@ -159,7 +160,13 @@ public void renderOverlay(RenderWorldLastEvent event) { } List coords = RandomizerItem.getPlaces(lookingAt.getPos(), lookingAt.getFace()); for (BlockPos e : coords) { - renderCubes.put(e, RandomizerItem.canMove(player.world.getBlockState(e), player.world, e) ? ClientConfigCyclic.getColor(stack) : Color.RED); + BlockState stHere = player.world.getBlockState(e); + if (!RandomizerItem.canMove(stHere, world, e) && !stHere.isAir()) { + renderCubes.put(e, ClientConfigCyclic.getColor(stack)); + } + else if (!stHere.isAir()) { + UtilRender.createBox(event.getMatrixStack(), e); // see: RenderBlockUtils and event.getPoseStack() + } } } stack = OreProspector.getIfHeld(player); diff --git a/src/main/java/com/lothrazar/cyclic/event/PlayerAbilityEvents.java b/src/main/java/com/lothrazar/cyclic/event/PlayerAbilityEvents.java index e571d2badd..12203f6800 100644 --- a/src/main/java/com/lothrazar/cyclic/event/PlayerAbilityEvents.java +++ b/src/main/java/com/lothrazar/cyclic/event/PlayerAbilityEvents.java @@ -41,7 +41,6 @@ private void tickFlying(PlayerEntity player, CyclicFile datFile) { } if (datFile.flyTicks > DISABLE_OFFSET) { player.abilities.allowFlying = true; - ModCyclic.LOGGER.info("allowFlying"); } else if (datFile.flyTicks <= DISABLE_OFFSET) { player.abilities.allowFlying = false; diff --git a/src/main/java/com/lothrazar/cyclic/item/EdibleFlightItem.java b/src/main/java/com/lothrazar/cyclic/item/EdibleFlightItem.java index da0df4a3a4..b7118d6da8 100644 --- a/src/main/java/com/lothrazar/cyclic/item/EdibleFlightItem.java +++ b/src/main/java/com/lothrazar/cyclic/item/EdibleFlightItem.java @@ -17,7 +17,7 @@ public class EdibleFlightItem extends ItemBase { public static IntValue TICKS; public EdibleFlightItem(Properties properties) { - super(properties.rarity(Rarity.RARE).food(new Food.Builder().hunger(3).saturation(0).setAlwaysEdible().build())); + super(properties.rarity(Rarity.RARE).food(new Food.Builder().hunger(1).saturation(0).setAlwaysEdible().build())); } @Override diff --git a/src/main/java/com/lothrazar/cyclic/item/EdibleSpecItem.java b/src/main/java/com/lothrazar/cyclic/item/EdibleSpecItem.java index 2f164fbe4f..248e94946d 100644 --- a/src/main/java/com/lothrazar/cyclic/item/EdibleSpecItem.java +++ b/src/main/java/com/lothrazar/cyclic/item/EdibleSpecItem.java @@ -17,7 +17,7 @@ public class EdibleSpecItem extends ItemBase { public static IntValue TICKS; public EdibleSpecItem(Properties properties) { - super(properties.rarity(Rarity.EPIC).food(new Food.Builder().hunger(3).saturation(0).setAlwaysEdible().build())); + super(properties.rarity(Rarity.EPIC).food(new Food.Builder().hunger(1).saturation(0).setAlwaysEdible().build())); } @Override diff --git a/src/main/java/com/lothrazar/cyclic/item/apple/AppleBuffs.java b/src/main/java/com/lothrazar/cyclic/item/apple/AppleBuffs.java index 0a5fe62bea..c1b2fdae3f 100644 --- a/src/main/java/com/lothrazar/cyclic/item/apple/AppleBuffs.java +++ b/src/main/java/com/lothrazar/cyclic/item/apple/AppleBuffs.java @@ -6,7 +6,6 @@ import java.util.List; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.potion.EffectInstance; import net.minecraft.util.text.ITextComponent; @@ -40,10 +39,6 @@ public void addInformation(ItemStack stack, World worldIn, List @Override public ItemStack onItemUseFinish(ItemStack stack, World worldIn, LivingEntity entityLiving) { - if (entityLiving instanceof PlayerEntity) { - // TOOD - ((PlayerEntity) entityLiving).getCooldownTracker().setCooldown(this, 30); - } return super.onItemUseFinish(stack, worldIn, entityLiving); } } diff --git a/src/main/java/com/lothrazar/cyclic/item/endereye/ItemEnderEyeReuse.java b/src/main/java/com/lothrazar/cyclic/item/endereye/ItemEnderEyeReuse.java index fe8a9bb69c..845b66645d 100644 --- a/src/main/java/com/lothrazar/cyclic/item/endereye/ItemEnderEyeReuse.java +++ b/src/main/java/com/lothrazar/cyclic/item/endereye/ItemEnderEyeReuse.java @@ -1,6 +1,7 @@ package com.lothrazar.cyclic.item.endereye; import com.lothrazar.cyclic.base.ItemBase; +import com.lothrazar.cyclic.compat.CompatConstants; import com.lothrazar.cyclic.util.UtilItemStack; import com.lothrazar.cyclic.util.UtilWorld; import net.minecraft.advancements.CriteriaTriggers; @@ -10,7 +11,6 @@ import net.minecraft.stats.Stats; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvents; import net.minecraft.util.math.BlockPos; @@ -27,15 +27,6 @@ public ItemEnderEyeReuse(Properties properties) { super(properties.maxDamage(256)); } - //compat with Repurposed Structures Mod see #1517 - private static final String RS_MODID = "repurposed_structures"; - private static final String RS_STRONGHOLD_ID = "stronghold_stonebrick"; - private static final String RS_NETHER_STRONGHOLD_ID = "stronghold_nether"; - private static final String YUSTRONG_MODID = "betterstrongholds"; // https://github.com/yungnickyoung/YUNGs-Better-Strongholds - private static final ResourceLocation RS_RESOURCE_LOCATION = new ResourceLocation(RS_MODID, RS_STRONGHOLD_ID); - private static final ResourceLocation RS_NETHER_RESOURCE_LOCATION = new ResourceLocation(RS_MODID, RS_NETHER_STRONGHOLD_ID); - private static final ResourceLocation YUNG_STRONGHOLD_LOCATION = new ResourceLocation(YUSTRONG_MODID, "stronghold"); - @Override public ActionResult onItemRightClick(World worldIn, PlayerEntity player, Hand hand) { ItemStack stack = player.getHeldItem(hand); @@ -48,22 +39,22 @@ public ActionResult onItemRightClick(World worldIn, PlayerEntity play Structure rsNetherStronghold; BlockPos closestBlockPos = chunkGenerator.func_235956_a_(sw, vanillaStronghold, new BlockPos(player.getPosition()), 100, false); BlockPos rsBlockPos; - if (ModList.get().isLoaded(RS_MODID)) { - if (ForgeRegistries.STRUCTURE_FEATURES.containsKey(RS_RESOURCE_LOCATION)) { - rsStronghold = ForgeRegistries.STRUCTURE_FEATURES.getValue(RS_RESOURCE_LOCATION); + if (ModList.get().isLoaded(CompatConstants.RS_MODID)) { + if (ForgeRegistries.STRUCTURE_FEATURES.containsKey(CompatConstants.RS_RESOURCE_LOCATION)) { + rsStronghold = ForgeRegistries.STRUCTURE_FEATURES.getValue(CompatConstants.RS_RESOURCE_LOCATION); rsBlockPos = chunkGenerator.func_235956_a_(sw, rsStronghold, new BlockPos(player.getPosition()), 100, false); closestBlockPos = returnClosest(player.getPosition(), closestBlockPos, rsBlockPos); } - if (ForgeRegistries.STRUCTURE_FEATURES.containsKey(RS_NETHER_RESOURCE_LOCATION)) { - rsNetherStronghold = ForgeRegistries.STRUCTURE_FEATURES.getValue(RS_NETHER_RESOURCE_LOCATION); + if (ForgeRegistries.STRUCTURE_FEATURES.containsKey(CompatConstants.RS_NETHER_RESOURCE_LOCATION)) { + rsNetherStronghold = ForgeRegistries.STRUCTURE_FEATURES.getValue(CompatConstants.RS_NETHER_RESOURCE_LOCATION); rsBlockPos = chunkGenerator.func_235956_a_(sw, rsNetherStronghold, new BlockPos(player.getPosition()), 100, false); closestBlockPos = returnClosest(player.getPosition(), closestBlockPos, rsBlockPos); } } //what if both YUNG and RS: ok not else if - if (closestBlockPos == null && ModList.get().isLoaded(YUSTRONG_MODID)) { - if (ForgeRegistries.STRUCTURE_FEATURES.containsKey(YUNG_STRONGHOLD_LOCATION)) { - rsStronghold = ForgeRegistries.STRUCTURE_FEATURES.getValue(YUNG_STRONGHOLD_LOCATION); + if (closestBlockPos == null && ModList.get().isLoaded(CompatConstants.YUSTRONG_MODID)) { + if (ForgeRegistries.STRUCTURE_FEATURES.containsKey(CompatConstants.YUNG_STRONGHOLD_LOCATION)) { + rsStronghold = ForgeRegistries.STRUCTURE_FEATURES.getValue(CompatConstants.YUNG_STRONGHOLD_LOCATION); rsBlockPos = chunkGenerator.func_235956_a_(sw, rsStronghold, new BlockPos(player.getPosition()), 100, false); closestBlockPos = returnClosest(player.getPosition(), closestBlockPos, rsBlockPos); } diff --git a/src/main/resources/data/cyclic/recipes/charm_knockback_resistance.json b/src/main/resources/data/cyclic/recipes/charm_knockback_resistance.json index e6e8f63008..bab31086e6 100644 --- a/src/main/resources/data/cyclic/recipes/charm_knockback_resistance.json +++ b/src/main/resources/data/cyclic/recipes/charm_knockback_resistance.json @@ -7,13 +7,13 @@ ], "key": { "g": { - "item": "minecraft:diamond" + "item": "minecraft:gold_ingot" }, "f": { "item": "minecraft:obsidian" }, "a": { - "item": "cyclic:gem_amber" + "item": "cyclic:gem_obsidian" } }, "result": { diff --git a/src/main/resources/data/cyclic/recipes/charm_longfall.json b/src/main/resources/data/cyclic/recipes/charm_longfall.json index d858f2c851..53f49060e4 100644 --- a/src/main/resources/data/cyclic/recipes/charm_longfall.json +++ b/src/main/resources/data/cyclic/recipes/charm_longfall.json @@ -16,7 +16,7 @@ "tag": "forge:feathers" }, "a": { - "item": "minecraft:diamond_boots" + "item": "cyclic:gem_amber" } }, "result": { diff --git a/src/main/resources/data/cyclic/recipes/experience_pylon.json b/src/main/resources/data/cyclic/recipes/experience_pylon.json index 823e183e73..163cbd5234 100644 --- a/src/main/resources/data/cyclic/recipes/experience_pylon.json +++ b/src/main/resources/data/cyclic/recipes/experience_pylon.json @@ -16,7 +16,7 @@ "item": "cyclic:gem_amber" }, "g": { - "item": "minecraft:lime_dye" + "tag": "forge:dyes/lime" }, "r": { "item": "minecraft:fire_charge" diff --git a/src/main/resources/data/cyclic/recipes/ghost.json b/src/main/resources/data/cyclic/recipes/ghost.json index 47a1214be1..4ffa03530c 100644 --- a/src/main/resources/data/cyclic/recipes/ghost.json +++ b/src/main/resources/data/cyclic/recipes/ghost.json @@ -13,7 +13,7 @@ "item": "minecraft:iron_nugget" }, "r": { - "item": "minecraft:gray_dye" + "tag": "forge:dyes/gray" } }, "result": { diff --git a/src/main/resources/data/cyclic/recipes/magic_net.json b/src/main/resources/data/cyclic/recipes/magic_net.json index 0ba6a9dba0..c646171ef6 100644 --- a/src/main/resources/data/cyclic/recipes/magic_net.json +++ b/src/main/resources/data/cyclic/recipes/magic_net.json @@ -7,20 +7,20 @@ ], "key": { "i": { - "item": "minecraft:iron_ingot" + "tag": "forge:ingots/gold" }, "l": { - "tag": "minecraft:coral_blocks" + "tag": "forge:vines" }, "a": { - "item": "minecraft:cyan_dye" + "tag": "forge:dyes/cyan" }, "q": { - "item": "minecraft:snowball" + "item": "minecraft:ice" } }, "result": { "item": "cyclic:magic_net", - "count": 2 + "count": 4 } } \ No newline at end of file diff --git a/src/main/resources/data/cyclic/recipes/randomize_scepter.json b/src/main/resources/data/cyclic/recipes/randomize_scepter.json index e6dbf97420..6b131236e3 100644 --- a/src/main/resources/data/cyclic/recipes/randomize_scepter.json +++ b/src/main/resources/data/cyclic/recipes/randomize_scepter.json @@ -7,10 +7,10 @@ ], "key": { "p": { - "item": "minecraft:purple_dye" + "tag": "forge:dyes/purple" }, "i": { - "item": "minecraft:iron_ingot" + "tag": "forge:ingots/iron" }, "g": { "item": "minecraft:redstone" diff --git a/src/main/resources/data/cyclic/recipes/scaffold_responsive.json b/src/main/resources/data/cyclic/recipes/scaffold_responsive.json index b17e308659..926297a1d3 100644 --- a/src/main/resources/data/cyclic/recipes/scaffold_responsive.json +++ b/src/main/resources/data/cyclic/recipes/scaffold_responsive.json @@ -10,7 +10,7 @@ "item": "minecraft:stick" }, "d": { - "item": "minecraft:red_dye" + "tag": "forge:dyes/red" } }, "result": { diff --git a/src/main/resources/data/cyclic/recipes/screen.json b/src/main/resources/data/cyclic/recipes/screen.json index ca7784aa19..52b58c2a2e 100644 --- a/src/main/resources/data/cyclic/recipes/screen.json +++ b/src/main/resources/data/cyclic/recipes/screen.json @@ -16,13 +16,13 @@ "item": "minecraft:iron_bars" }, "r": { - "item": "minecraft:red_dye" + "tag": "forge:dyes/red" }, "g": { - "item": "minecraft:green_dye" + "tag": "forge:dyes/green" }, "b": { - "item": "minecraft:blue_dye" + "tag": "forge:dyes/blue" } }, "result": { diff --git a/src/main/resources/data/cyclic/recipes/solidifier_apple.json b/src/main/resources/data/cyclic/recipes/solidifier_apple.json index 4004af659b..707ae14a67 100644 --- a/src/main/resources/data/cyclic/recipes/solidifier_apple.json +++ b/src/main/resources/data/cyclic/recipes/solidifier_apple.json @@ -12,7 +12,7 @@ "mix": { "fluid": "cyclic:honey", "tag": "forge:honey", - "count": 300 + "count": 3000 }, "result": { "item": "cyclic:apple_honey", diff --git a/src/main/resources/data/cyclic/recipes/solidifier_apple0.json b/src/main/resources/data/cyclic/recipes/solidifier_apple0.json index 3c669592c4..0c67f8522d 100644 --- a/src/main/resources/data/cyclic/recipes/solidifier_apple0.json +++ b/src/main/resources/data/cyclic/recipes/solidifier_apple0.json @@ -6,7 +6,7 @@ "mix": { "fluid": "cyclic:honey", "tag": "forge:honey", - "count": 100 + "count": 1000 }, "result": { "item": "cyclic:apple_honey", diff --git a/src/main/resources/data/cyclic/recipes/soundproofing.json b/src/main/resources/data/cyclic/recipes/soundproofing.json index 8123aeb9ba..393f63c32b 100644 --- a/src/main/resources/data/cyclic/recipes/soundproofing.json +++ b/src/main/resources/data/cyclic/recipes/soundproofing.json @@ -7,7 +7,7 @@ ], "key": { "s": { - "item": "minecraft:orange_dye" + "tag": "forge:dyes/orange" }, "o": { "item": "minecraft:bone_block" diff --git a/src/main/resources/data/cyclic/recipes/spawner_seeker.json b/src/main/resources/data/cyclic/recipes/spawner_seeker.json index 78765dd969..db3192e519 100644 --- a/src/main/resources/data/cyclic/recipes/spawner_seeker.json +++ b/src/main/resources/data/cyclic/recipes/spawner_seeker.json @@ -16,7 +16,7 @@ "item": "minecraft:ender_pearl" }, "d": { - "item": "minecraft:purple_dye" + "tag": "forge:dyes/purple" } }, "result": { diff --git a/src/main/resources/data/cyclic/recipes/spelunker.json b/src/main/resources/data/cyclic/recipes/spelunker.json index 53888d7274..d750dd3f6c 100644 --- a/src/main/resources/data/cyclic/recipes/spelunker.json +++ b/src/main/resources/data/cyclic/recipes/spelunker.json @@ -13,7 +13,7 @@ "item": "minecraft:flint" }, "g": { - "item": "minecraft:light_blue_dye" + "tag": "forge:dyes/light_blue" } }, "result": { diff --git a/src/main/resources/data/forge/tags/items/mushrooms.json b/src/main/resources/data/forge/tags/items/mushrooms.json new file mode 100644 index 0000000000..d73b127882 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/mushrooms.json @@ -0,0 +1,76 @@ +{ + "replace": false, + "values": [ + "minecraft:red_mushroom", + "minecraft:brown_mushroom", + "minecraft:warped_fungus", + "minecraft:crimson_fungus", + {"required":false, "id": "mushroomquest:tinyfungibunch" }, + {"required":false, "id": "mushroomquest:tall_warped_fungus" }, + {"required":false, "id": "mushroomquest:tall_crimson_fungi" }, + {"required":false, "id": "mushroomquest:tinyfungibunch" }, + {"required":false, "id": "mushroomquest:toadstool" }, + {"required":false, "id": "mushroomquest:glowstoolbunch" }, + {"required":false, "id": "mushroomquest:shrump" }, + {"required":false, "id": "mushroomquest:bigmushroombunch" }, + {"required":false, "id": "mushroomquest:tinyfungibunch" }, + {"required":false, "id": "mushroomquest:greenglowshroom" }, + {"required":false, "id": "mushroomquest:magentaglowshroom" }, + {"required":false, "id": "mushroomquest:blueglowshroom" }, + {"required":false, "id": "bettermushrooms:big_mushroom" }, + {"required":false, "id": "bettermushrooms:glowing_mushroom" }, + {"required":false, "id": "bettermushrooms:champignon_food" }, + {"required":false, "id": "thebeginning:reko_shroom" }, + {"required":false, "id": "thebeginning:plana_shroom" }, + {"required":false, "id": "aoa3:blue_glowshroom" }, + {"required":false, "id": "aoa3:green_glowshroom" }, + {"required":false, "id": "aoa3:orange_glowshroom" }, + {"required":false, "id": "aoa3:purple_glowshroom" }, + {"required":false, "id": "aoa3:yellow_glowshroom" }, + {"required":false, "id": "mystic_plants:nausea_mushroom" }, + {"required":false, "id": "gaiadimension:missingno_fungus" }, + {"required":false, "id": "gaiadimension:gold_orb_tucher" }, + {"required":false, "id": "gaiadimension:elder_imklia" }, + {"required":false, "id": "gaiadimension:corrupted_gaia_eye" }, + {"required":false, "id": "gaiadimension:mystical_murgni" }, + {"required":false, "id": "gaiadimension:stickly_cupsir" }, + {"required":false, "id": "gaiadimension:bulbous_hobina" }, + {"required":false, "id": "gaiadimension:roofed_agaric" }, + {"required":false, "id": "gaiadimension:thorny_wiltha" }, + {"required":false, "id": "gaiadimension:spotted_kersi" }, + {"required":false, "id": "byg:death_cap" }, + {"required":false, "id": "byg:fungal_imparius" }, + {"required":false, "id": "byg:imparius_mushroom" }, + {"required":false, "id": "byg:blue_glowshroom" }, + {"required":false, "id": "byg:purple_glowshroom" }, + {"required":false, "id": "byg:green_mushroom" }, + {"required":false, "id": "byg:soul_shroom" }, + {"required":false, "id": "byg:soul_shroom_spore_end" }, + {"required":false, "id": "byg:black_puff" }, + {"required":false, "id": "byg:wood_blewit" }, + {"required":false, "id": "byg:weeping_milkcap" }, + {"required":false, "id": "byg:shulkren_fungus" }, + {"required":false, "id": "byg:sythian_fungus" }, + {"required":false, "id": "quark:glowshroom" }, + {"required":false, "id": "tconstruct:blood_slime_sapling" }, + {"required":false, "id": "biomesoplenty:toadstool" }, + {"required":false, "id": "biomesoplenty:glowshroom" }, + {"required":false, "id": "botania:white_mushroom" }, + {"required":false, "id": "botania:orange_mushroom" }, + {"required":false, "id": "botania:pink_mushroom" }, + {"required":false, "id": "botania:cyan_mushroom" }, + {"required":false, "id": "botania:yellow_mushroom" }, + {"required":false, "id": "botania:lime_mushroom" }, + {"required":false, "id": "botania:light_blue_mushroom" }, + {"required":false, "id": "botania:magenta_mushroom" }, + {"required":false, "id": "botania:gray_mushroom" }, + {"required":false, "id": "botania:light_gray_mushroom" }, + {"required":false, "id": "botania:cyan_mushroom" }, + {"required":false, "id": "botania:purple_mushroom" }, + {"required":false, "id": "botania:blue_mushroom" }, + {"required":false, "id": "botania:brown_mushroom" }, + {"required":false, "id": "botania:green_mushroom" }, + {"required":false, "id": "botania:red_mushroom" } + + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forge/tags/items/sandstone.json b/src/main/resources/data/forge/tags/items/sandstone.json new file mode 100644 index 0000000000..1c17191635 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/sandstone.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "minecraft:cut_sandstone", + "minecraft:chiseled_sandstone", + "minecraft:sandstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forge/tags/items/vines.json b/src/main/resources/data/forge/tags/items/vines.json new file mode 100644 index 0000000000..11295d61d7 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/vines.json @@ -0,0 +1,24 @@ +{ + "replace": false, + "values": [ + "minecraft:vine", + "minecraft:weeping_vines", + "minecraft:twisting_vines", + {"required":false, "id": "tconstruct:sky_slime_vine" }, + {"required":false, "id": "tconstruct:ender_slime_vine" }, + {"required":false, "id": "biomesoplenty:willow_vine" }, + {"required":false, "id": "biomesoplenty:spanish_moss" }, + {"required":false, "id": "quark:root" }, + {"required":false, "id": "byg:skyris_vine" }, + {"required":false, "id": "byg:poison_ivy" }, + {"required":false, "id": "byg:lament_vine" }, + {"required":false, "id": "byg:lament_vine_plant" }, + {"required":false, "id": "byg:imparius_vine" }, + {"required":false, "id": "byg:imparius_vine_plant" }, + {"required":false, "id": "byg:shulkren_vine" }, + {"required":false, "id": "byg:shulkren_vine_plant" }, + {"required":false, "id": "byg:fungal_imparius_filament" }, + {"required":false, "id": "byg:whaling_vine" } + + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forge/tags/items/workbench.json b/src/main/resources/data/forge/tags/items/workbench.json new file mode 100644 index 0000000000..3fb43c0270 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/workbench.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "cyclic:workbench" + ] +} \ No newline at end of file diff --git a/update.json b/update.json index 2f4b754f16..bcac7ca285 100644 --- a/update.json +++ b/update.json @@ -79,6 +79,6 @@ ,"1.5.20":"#2102 wooden and golden hopper deposit logic fixed, now matches 1.18.2+ versions. #2085 Hopper reach area & pickup logic now uses vanilla-hopper area size. JEED compatibility added for some potion effects. Port Fishing Net and Mending Fishingrods compatibility from 1.12.2 #2067. Ender Apple now sends a message if nothing is found (void/flatworlds/etc). Growth enchant now skips IGrowable blocks that return false for 'canGrow();'. Many new config options added for: growth enchant, beheading enchant, battery, sprinkler, experience_pylon, fisher, scythes, and others in cyclic.toml" ,"1.5.21":"#1933 Sack of Holding chest placement override added, with new config to revert back to legacy behavior if desired (overrideChestSingle). #2168 fix bug where ender shelf sometimes would not save contents when mined after exiting reloading world when client data desyncs. Added a percentage config and ignorelist config for cyclic:disarm enchantment (disarmPercentPerLevel, disarmIngoredMobs), resolves it dropping your copied weapon from alexsmobs:mimicube #2249. Fix #1878 layered and/or logic for multiple wireless transmitters on the same node " ,"1.5.22":"Fix #2351 advanced crafting stick not opening. " - ,"1.5.23":"Backport #2182 candle model assets. New config under [cyclic.blocks] wireless_transfer_dimensional = true allowing transfer nodes to connect across dimensions if possible #1913. Excavate enchant will no longer trigger if the tool is not 'mineable' effective for example axe on dirt. Excavate enchant will not trigger on anything matching the new block tag [cyclic:ignored/excavate] #2116 " + ,"1.5.23":"New config under [cyclic.blocks] wireless_transfer_dimensional = true allowing transfer nodes to connect across dimensions #1913. Balance recipe changes for #2372. Balance changes made for Excavate enchant it will no longer trigger if the tool is not 'mineable' effective for example axe on dirt. New feature for Excavate enchant #2116 it will not trigger on anything matching the block data-tag 'cyclic:ignored/excavate'. [Backported changes from mc1.20.1] zenscript support for generator_fluid and generator_item; #2182 candle model assets; Block Breaker no longer tries (and fails) to mine liquid source blocks; Block Randomizer use wireframe rendering only of non-air instead of solid shading; Glistering & Corrupted chorus only restores 1 food-unit down from 3; a few recipes tweaked/backported to match mc1.20.1+ " } }