mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Update forge, restore jei integration
This commit is contained in:
1 parent
b9980ffaac
commit
e7f79f3336
22 files changed
+39
-21
No files matched your search
+4
-4
@@ -28,7 +28,7 @@ archivesBaseName = config.mod_name
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
||||
|
||||
minecraft {
|
||||
mappings channel: 'snapshot', version: '20190630-1.14.3'
|
||||
mappings channel: 'snapshot', version: '20190709-1.14.3'
|
||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
runs {
|
||||
client {
|
||||
@@ -87,12 +87,12 @@ configurations {
|
||||
//End of the SCP config
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:1.14.3-27.0.23'
|
||||
minecraft 'net.minecraftforge:forge:1.14.3-27.0.57'
|
||||
|
||||
//deobfCompile "com.mod-buildcraft:buildcraft-api:7.99.17"
|
||||
//deobfCompile "com.azanor.baubles:Baubles:1.12-1.5.2"
|
||||
//compileOnly fg.deobf("mezz.jei:jei-1.13.2:5.0.0.20:api")
|
||||
// runtimeOnly fg.deobf("mezz.jei:jei-1.13.2:5.0.0.20")
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.14.3:6.0.0.8:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.14.3:6.0.0.8")
|
||||
|
||||
compileOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.14.3-0.14:api")
|
||||
runtimeOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.14.3-0.14")
|
||||
|
||||
@@ -83,7 +83,7 @@ public final class BlockHighlightRenderHandler {
|
||||
}
|
||||
|
||||
double offY = -1.0 / 16 + 0.005;
|
||||
for(Entity e : mc.world.func_217416_b())
|
||||
for(Entity e : mc.world.getAllEntities())
|
||||
if(e instanceof EntityMagicLandmine) {
|
||||
BlockPos bpos = e.getPosition();
|
||||
AxisAlignedBB aabb = new AxisAlignedBB(bpos).offset(0, offY, 0).grow(2.5, 0, 2.5);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class RenderLexicon {
|
||||
|
||||
pageFlip = pageFlipTicks / 5F;
|
||||
|
||||
model.func_217103_a(0F, 0F, pageFlip, opening, 0F, 1F / 16F);
|
||||
model.render(0F, 0F, pageFlip, opening, 0F, 1F / 16F);
|
||||
if(ticks < 3) {
|
||||
FontRenderer font = Minecraft.getInstance().fontRenderer;
|
||||
GlStateManager.rotatef(180F, 0F, 0F, 1F);
|
||||
|
||||
+6
-6
@@ -95,11 +95,11 @@ public class JEIBotaniaPlugin implements IModPlugin {
|
||||
|
||||
@Override
|
||||
public void registerRecipes(@Nonnull IRecipeRegistration registry) {
|
||||
registry.addRecipes(BotaniaAPI.brewRecipes, BreweryRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.pureDaisyRecipes, PureDaisyRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.petalRecipes, PetalApothecaryRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.elvenTradeRecipes, ElvenTradeRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.runeAltarRecipes, RunicAltarRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.brewRecipes.values(), BreweryRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.pureDaisyRecipes.values(), PureDaisyRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.petalRecipes.values(), PetalApothecaryRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.elvenTradeRecipes.values(), ElvenTradeRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.runeAltarRecipes.values(), RunicAltarRecipeCategory.UID);
|
||||
registry.addRecipes(BotaniaAPI.manaInfusionRecipes.values(), ManaPoolRecipeCategory.UID);
|
||||
|
||||
registry.addRecipes(
|
||||
@@ -162,7 +162,7 @@ public class JEIBotaniaPlugin implements IModPlugin {
|
||||
@Override
|
||||
public void onRuntimeAvailable(IJeiRuntime jeiRuntime) {
|
||||
IRecipeManager recipeRegistry = jeiRuntime.getRecipeManager();
|
||||
for(RecipeElvenTrade recipe : BotaniaAPI.elvenTradeRecipes) {
|
||||
for(RecipeElvenTrade recipe : BotaniaAPI.elvenTradeRecipes.values()) {
|
||||
List<Ingredient> inputs = recipe.getInputs();
|
||||
List<ItemStack> outputs = recipe.getOutputs();
|
||||
if(inputs.size() == 1 && outputs.size() == 1 && inputs.get(0).test(outputs.get(0))) {
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -45,14 +45,14 @@ public class SkyblockSkyRenderer implements IRenderHandler {
|
||||
|
||||
// [VanillaCopy] WorldRenderer.renderSky, overworld section, edits noted
|
||||
@Override
|
||||
public void render(float partialTicks, ClientWorld world, Minecraft mc) {
|
||||
public void render(int ticks, float partialTicks, ClientWorld world, Minecraft mc) {
|
||||
// Environment setup
|
||||
int glSkyList = mc.worldRenderer.glSkyList;
|
||||
net.minecraft.client.renderer.vertex.VertexBuffer skyVBO = mc.worldRenderer.skyVBO;
|
||||
|
||||
// Begin
|
||||
GlStateManager.disableTexture();
|
||||
Vec3d vec3d = world.func_217382_a(mc.gameRenderer.getActiveRenderInfo().getBlockPos(), partialTicks);
|
||||
Vec3d vec3d = world.getSkyColor(mc.gameRenderer.getActiveRenderInfo().getBlockPos(), partialTicks);
|
||||
float f = (float)vec3d.x;
|
||||
float f1 = (float)vec3d.y;
|
||||
float f2 = (float)vec3d.z;
|
||||
|
||||
@@ -25,12 +25,15 @@ import vazkii.botania.common.lib.LibMisc;
|
||||
import net.minecraftforge.items.wrapper.EmptyHandler;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TileRedStringContainer extends TileRedString {
|
||||
@ObjectHolder(LibMisc.MOD_ID + ":" + LibBlockNames.RED_STRING_CONTAINER)
|
||||
public static TileEntityType<TileRedStringContainer> TYPE;
|
||||
private static final LazyOptional<IItemHandler> EMPTY = LazyOptional.of(EmptyHandler::new);
|
||||
@Nullable
|
||||
private LazyOptional<?> lastBoundInv = null;
|
||||
|
||||
public TileRedStringContainer() {
|
||||
this(TYPE);
|
||||
@@ -51,16 +54,31 @@ public class TileRedStringContainer extends TileRedString {
|
||||
@Nonnull
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
|
||||
// todo 1.13 need to invalidate when binding breaks
|
||||
if(cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
|
||||
if(getTileAtBinding() != null) {
|
||||
return getTileAtBinding().getCapability(cap, side);
|
||||
lastBoundInv = getTileAtBinding().getCapability(cap, side);
|
||||
return lastBoundInv.cast();
|
||||
} else {
|
||||
invalidateLastCap();
|
||||
return EMPTY.cast();
|
||||
}
|
||||
return EMPTY.cast();
|
||||
}
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
private void invalidateLastCap() {
|
||||
if(lastBoundInv != null) {
|
||||
lastBoundInv.invalidate();
|
||||
lastBoundInv = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
super.remove();
|
||||
invalidateLastCap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
super.markDirty();
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class LootHandler {
|
||||
|
||||
private static LootEntry.Builder getInjectEntry(String name, int weight) {
|
||||
ResourceLocation table = new ResourceLocation(LibMisc.MOD_ID, "inject/" + name);
|
||||
return TableLootEntry.func_216171_a(table)
|
||||
return TableLootEntry.builder(table)
|
||||
.weight(weight);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class ItemBloodPendant extends ItemBauble implements IBrewContainer, IBre
|
||||
|
||||
list.add(new TranslationTextComponent("botaniamisc.brewOf", I18n.format(brew.getUnlocalizedName(stack))).applyTextStyle(TextFormatting.LIGHT_PURPLE));
|
||||
for(EffectInstance effect : brew.getPotionEffects(stack)) {
|
||||
TextFormatting format = effect.getPotion().type.func_220306_a();
|
||||
TextFormatting format = effect.getPotion().type.getColor();
|
||||
ITextComponent cmp = new TranslationTextComponent(effect.getEffectName());
|
||||
if(effect.getAmplifier() > 0) {
|
||||
cmp.appendText(" ");
|
||||
|
||||
@@ -81,7 +81,7 @@ public class ItemLivingwoodBow extends BowItem implements IManaUsingItem {
|
||||
if (entityLiving instanceof PlayerEntity) {
|
||||
PlayerEntity playerentity = (PlayerEntity)entityLiving;
|
||||
boolean flag = canFire(stack, playerentity); // Botania - custom check
|
||||
ItemStack itemstack = playerentity.func_213356_f(stack);
|
||||
ItemStack itemstack = playerentity.findAmmo(stack);
|
||||
|
||||
int i = (int) ((getUseDuration(stack) - timeLeft) * chargeVelocityMultiplier()); // Botania - velocity multiplier
|
||||
i = net.minecraftforge.event.ForgeEventFactory.onArrowLoose(stack, worldIn, playerentity, i, !itemstack.isEmpty() || flag);
|
||||
@@ -148,7 +148,7 @@ public class ItemLivingwoodBow extends BowItem implements IManaUsingItem {
|
||||
boolean canFire(ItemStack stack, PlayerEntity player) {
|
||||
return player.abilities.isCreativeMode
|
||||
|| EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, stack) > 0
|
||||
|| !player.func_213356_f(stack).isEmpty();
|
||||
|| !player.findAmmo(stack).isEmpty();
|
||||
}
|
||||
|
||||
void onFire(ItemStack bow, LivingEntity living, boolean infinity, AbstractArrowEntity arrow) {
|
||||
|
||||
Reference in new issue
Block a user