mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
various miscellaneous fixes
This commit is contained in:
1 parent
f5b435bf24
commit
79c8e3d695
14 files changed
+30
-44
No files matched your search
@@ -46,8 +46,6 @@ public final class BoundTileRenderer {
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.enableBlend();
|
||||
|
||||
// todo 1.8 Tessellator.renderingVertexBuffer = false;
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
int color = Color.HSBtoRGB(ClientTickHandler.ticksInGame % 200 / 200F, 0.6F, 1F);
|
||||
|
||||
|
||||
@@ -75,8 +75,9 @@ public class RenderTileAvatar extends TileEntitySpecialRenderer<TileAvatar> {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
float s = 0.6F;
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.translate(-0.5F, 2.125F, 0F); // todo 1.8 tweak held item render
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.THIRD_PERSON_RIGHT_HAND); // todo 1.9
|
||||
GlStateManager.translate(-0.5F, 2F, -0.25F);
|
||||
GlStateManager.rotate(-70, 1, 0, 0);
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.THIRD_PERSON_RIGHT_HAND);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
IAvatarWieldable wieldable = (IAvatarWieldable) stack.getItem();
|
||||
|
||||
@@ -47,7 +47,7 @@ public class RenderTileCocoon extends TileEntitySpecialRenderer<TileCocoon> {
|
||||
GlStateManager.translate(d0, d1, d2 + 1);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GlStateManager.translate(0.5F, 0, 0F);
|
||||
GlStateManager.rotate(rot, 1F, 0F, 0F); // todo 1.8 fixme looks a little weird compared to 1.7
|
||||
GlStateManager.rotate(rot, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-0.5F, 0, 0F);
|
||||
IBlockState state = cocoon.getWorld().getBlockState(cocoon.getPos());
|
||||
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(state);
|
||||
|
||||
@@ -74,6 +74,6 @@ public class RenderTileSkullOverride extends TileEntitySkullRenderer {
|
||||
|
||||
ShaderHelper.releaseShader();
|
||||
GlStateManager.popMatrix();
|
||||
} else super.renderSkull(par1, par2, par3, par4, par5, par6, gameProfile, digProgress, 0); // todo 1.9 last parameter
|
||||
} else super.renderSkull(par1, par2, par3, par4, par5, par6, gameProfile, digProgress, 0);
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class BlockBifrost extends BlockMod implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
Block block = world.getBlockState(pos.offset(side)).getBlock();
|
||||
return block != this && super.shouldSideBeRendered(state, world, pos, side);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -62,7 +63,7 @@ public class BlockRedStringInterceptor extends BlockRedString {
|
||||
@SubscribeEvent
|
||||
public void onInteract(PlayerInteractEvent event) {
|
||||
if(event.getAction() == Action.RIGHT_CLICK_BLOCK)
|
||||
TileRedStringInterceptor.onInteract(event.getEntityPlayer(), event.getWorld(), event.getPos());
|
||||
TileRedStringInterceptor.onInteract(event.getEntityPlayer(), event.getWorld(), event.getPos(), EnumHand.MAIN_HAND); // todo 1.9
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,7 +65,6 @@ public class SubTilePollidisiac extends SubTileFunctional {
|
||||
mana -= manaCost;
|
||||
|
||||
ReflectionHelper.setPrivateValue(EntityAnimal.class, animal, 1200, LibObfuscation.IN_LOVE);
|
||||
// todo 1.8 new AI animal.setTarget(null);
|
||||
supertile.getWorld().setEntityState(animal, (byte)18);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,16 +197,6 @@ public class TileBrewery extends TileSimpleInventory implements IManaReceiver {
|
||||
return INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
/*@Override todo 1.8
|
||||
public int[] getSlotsForFace(EnumFacing var1) {
|
||||
int accessibleSlot = -1;
|
||||
for(int i = 0; i < getSizeInventory(); i++)
|
||||
if(getStackInSlot(i) != null)
|
||||
accessibleSlot = i;
|
||||
|
||||
return accessibleSlot == -1 ? new int[0] : new int[] { accessibleSlot };
|
||||
}*/
|
||||
|
||||
@Override
|
||||
protected SimpleItemStackHandler createItemHandler() {
|
||||
return new SimpleItemStackHandler(this, false) {
|
||||
|
||||
@@ -298,16 +298,6 @@ public class TileRuneAltar extends TileSimpleInventory implements IManaReceiver
|
||||
return INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
/*@Override todo 1.8
|
||||
public int[] getSlotsForFace(EnumFacing var1) {
|
||||
int accessibleSlot = -1;
|
||||
for(int i = 0; i < getSizeInventory(); i++)
|
||||
if(getStackInSlot(i) != null)
|
||||
accessibleSlot = i;
|
||||
|
||||
return accessibleSlot == -1 ? new int[0] : new int[] { accessibleSlot };
|
||||
}*/
|
||||
|
||||
@Override
|
||||
protected SimpleItemStackHandler createItemHandler() {
|
||||
return new SimpleItemStackHandler(this, false) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TileRedStringInterceptor extends TileRedString {
|
||||
return !tileEntityInvalid && worldObj.getTileEntity(pos) == this;
|
||||
}
|
||||
|
||||
public static void onInteract(EntityPlayer player, World world, BlockPos pos) {
|
||||
public static void onInteract(EntityPlayer player, World world, BlockPos pos, EnumHand hand) {
|
||||
List<TileRedStringInterceptor> remove = new ArrayList<>();
|
||||
boolean did = false;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class TileRedStringInterceptor extends TileRedString {
|
||||
interceptors.removeAll(remove);
|
||||
if(did) {
|
||||
if(world.isRemote)
|
||||
player.swingArm(EnumHand.MAIN_HAND); // todo 1.9
|
||||
player.swingArm(hand);
|
||||
else world.playSound(null, pos, SoundEvents.block_dispenser_dispense, SoundCategory.BLOCKS, 0.3F, 0.6F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,11 +110,19 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int pos, boolean equipped) {
|
||||
if (!(entity instanceof EntityLivingBase))
|
||||
return;
|
||||
EntityLivingBase living = ((EntityLivingBase) entity);
|
||||
|
||||
boolean eqLastTick = wasEquipped(stack);
|
||||
|
||||
if (!equipped && living.getHeldItemOffhand() == stack)
|
||||
equipped = true;
|
||||
|
||||
if(eqLastTick != equipped)
|
||||
setEquipped(stack, equipped);
|
||||
|
||||
if(!equipped && entity instanceof EntityLivingBase) {
|
||||
if(!equipped) {
|
||||
int angles = 360;
|
||||
int segAngles = angles / SEGMENTS;
|
||||
float shift = segAngles / 2;
|
||||
@@ -398,7 +406,6 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
public void render(ItemStack stack, EntityPlayer player, float partialTicks) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Tessellator tess = Tessellator.getInstance();
|
||||
// todo 1.8.8 Tessellator.renderingVertexBuffer = false;
|
||||
|
||||
double renderPosX, renderPosY, renderPosZ;
|
||||
|
||||
@@ -451,19 +458,20 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
ItemStack slotStack = getItemForSlot(stack, seg);
|
||||
if(slotStack != null) {
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
float scale = seg == 0 ? 0.75F : 0.6F;
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
GlStateManager.rotate(180F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(seg == 0 ? 0.5F : 0F, seg == 0 ? -0.1F : 0.6F, 0F);
|
||||
|
||||
if(slotStack.getItem() instanceof ItemBlock) {
|
||||
float scale = seg == 0 ? 0.75F : 0.6F;
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
GlStateManager.rotate(180F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(seg == 0 ? 0.5F : 0F, seg == 0 ? -0.1F : 0.6F, 0F);
|
||||
GlStateManager.translate(0, -0.5, 0.5F); // todo 1.8 refine
|
||||
|
||||
IBlockState state = ((ItemBlock) slotStack.getItem()).block.getStateFromMeta(slotStack.getItemDamage());
|
||||
IBlockState state = ((ItemBlock) slotStack.getItem()).block.getStateFromMeta(slotStack.getItem().getMetadata(slotStack.getMetadata()));
|
||||
Minecraft.getMinecraft().getBlockRendererDispatcher().renderBlockBrightness(state, 1.0F);
|
||||
} else {
|
||||
GlStateManager.scale(0.75F, 0.75F, 0.75F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
|
||||
//GlStateManager.translate(0, -0.5, 0.5F); // todo 1.8 refine
|
||||
GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(slotStack, ItemCameraTransforms.TransformType.GUI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class LensFirework extends Lens {
|
||||
ItemNBTHelper.setCompound(stack, "Explosion", explosion);
|
||||
|
||||
NBTTagCompound fireworks = new NBTTagCompound();
|
||||
fireworks.setInteger("Flight", (int) (Math.random() * 3 + 2)); // todo 1.8 this bugged in 1.7 to always be 0 (cast before multiplication). is that intended now?
|
||||
fireworks.setInteger("Flight", (int) (Math.random() * 3 + 2));
|
||||
|
||||
NBTTagList explosions = new NBTTagList();
|
||||
explosions.appendTag(explosion);
|
||||
|
||||
@@ -69,9 +69,7 @@ public final class LibObfuscation {
|
||||
public static final String[] SPAWN_DELAY = new String[] { "spawnDelay", "field_98286_b", "a" };
|
||||
public static final String[] PREV_MOB_ROTATION = new String[] { "prevMobRotation", "field_98284_d", "e" };
|
||||
public static final String[] MOB_ROTATION = new String[] { "mobRotation", "field_98287_c", "d" };
|
||||
public static final String[] GET_ENTITY_TO_SPAWN = new String[] { "getEntityNameToSpawn", "func_98276_e", "g" };
|
||||
public static final String[] RANDOM_ENTITY = new String[] { "randomEntity", "field_98282_f", "c" };
|
||||
public static final String[] SPAWN_NEW_ENTITY = new String[] { "spawnNewEntity", "func_180613_a", "a" }; // todo 1.9
|
||||
|
||||
// GuiIngame
|
||||
public static final String[] REMAINING_HIGHLIGHT_TICKS = new String[] { "remainingHighlightTicks", "field_92017_k", "q" };
|
||||
|
||||
Reference in new issue
Block a user