Update mappings to 20200510

This commit is contained in:
Hubry committed 2020-05-10 21:39:43 +02:00
1 parent e3be3c6138
commit 8ebfd99157
232 files changed
+1067 -1067

No files matched your search

@@ -32,7 +32,7 @@ public final class AccessoryRenderHelper {
*/
public static void applySneakingRotation(MatrixStack ms) {
ms.translate(0F, 0.2F, 0F);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90F / (float) Math.PI));
ms.rotate(Vector3f.XP.rotationDegrees(90F / (float) Math.PI));
}
/**
@@ -44,9 +44,9 @@ public final class AccessoryRenderHelper {
float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * partialTicks;
float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * partialTicks;
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-yawOffset));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(yaw - 270));
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(pitch));
ms.rotate(Vector3f.YP.rotationDegrees(-yawOffset));
ms.rotate(Vector3f.YP.rotationDegrees(yaw - 270));
ms.rotate(Vector3f.ZP.rotationDegrees(pitch));
ms.translate(0, -player.getEyeHeight(), 0);
// if (player.shouldRenderSneaking()) TODO Sneaking needs a different adjustment now
@@ -40,7 +40,7 @@ public final class AstrolabePreviewHandler {
public static void onWorldRenderLast(RenderWorldLastEvent event) {
World world = Minecraft.getInstance().world;
MatrixStack ms = event.getMatrixStack();
IRenderTypeBuffer.Impl buffers = Minecraft.getInstance().getBufferBuilders().getEntityVertexConsumers();
IRenderTypeBuffer.Impl buffers = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource();
IVertexBuilder buffer = buffers.getBuffer(RenderHelper.ASTROLABE_PREVIEW);
for (PlayerEntity player : world.getPlayers()) {
@@ -57,7 +57,7 @@ public final class AstrolabePreviewHandler {
}
}
buffers.draw(RenderHelper.ASTROLABE_PREVIEW);
buffers.finish(RenderHelper.ASTROLABE_PREVIEW);
}
private static void renderPlayerLook(MatrixStack ms, IVertexBuilder buffer, PlayerEntity player, ItemStack stack) {
@@ -87,7 +87,7 @@ public final class AstrolabePreviewHandler {
float g = (float) (color >> 8 & 255) / 255.0F;
float b = (float) (color & 255) / 255.0F;
// always use entity translucent layer so blending is turned on
brd.getBlockModelRenderer().render(ms.peek(), buffer, state, model, r, g, b, 0xF000F0, OverlayTexture.DEFAULT_UV);
brd.getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, state, model, r, g, b, 0xF000F0, OverlayTexture.NO_OVERLAY);
ms.pop();
}
@@ -106,18 +106,18 @@ public final class BaubleRenderHandler extends LayerRenderer<AbstractClientPlaye
ms.push();
boolean armor = !player.getItemStackFromSlot(EquipmentSlotType.LEGS).isEmpty();
getEntityModel().bipedBody.rotate(ms);
getEntityModel().bipedBody.translateRotate(ms);
ms.translate(0, 0.65, 0);
if (renderedOne) {
ms.translate(armor ? 0.3 : 0.25, 0, 0);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-90F));
ms.rotate(Vector3f.YP.rotationDegrees(-90F));
} else {
ms.translate(armor ? -0.3 : -0.25, 0, 0);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90F));
ms.rotate(Vector3f.YP.rotationDegrees(90F));
}
ms.scale(0.375F, -0.375F, -0.375F);
Minecraft.getInstance().getItemRenderer().renderItem(stack, ItemCameraTransforms.TransformType.NONE, 0xF000F0, OverlayTexture.DEFAULT_UV, ms, buffers);
Minecraft.getInstance().getItemRenderer().renderItem(stack, ItemCameraTransforms.TransformType.NONE, 0xF000F0, OverlayTexture.NO_OVERLAY, ms, buffers);
ms.pop();
if (renderedOne) {
@@ -55,7 +55,7 @@ public final class BlockHighlightRenderHandler {
Minecraft mc = Minecraft.getInstance();
RayTraceResult pos = mc.objectMouseOver;
MatrixStack ms = event.getMatrixStack();
IRenderTypeBuffer.Impl buffers = IRenderTypeBuffer.immediate(Tessellator.getInstance().getBuffer());
IRenderTypeBuffer.Impl buffers = IRenderTypeBuffer.getImpl(Tessellator.getInstance().getBuffer());
/* Needed because RenderState.CullState doesn't actually disable if you pass false, it keeps the current state.
And we go into this method with cull enabled.
*/
@@ -113,7 +113,7 @@ public final class BlockHighlightRenderHandler {
}
ms.pop();
buffers.draw();
buffers.finish();
}
private static void renderRectangle(MatrixStack ms, IRenderTypeBuffer buffers, AxisAlignedBB aabb, boolean inner, @Nullable Integer color, byte alpha) {
@@ -136,21 +136,21 @@ public final class BlockHighlightRenderHandler {
float z = (float) (aabb.maxZ - aabb.minZ - f);
IVertexBuilder buffer = buffers.getBuffer(RenderHelper.RECTANGLE);
Matrix4f mat = ms.peek().getModel();
buffer.vertex(mat, x, f, f).color(r, g, b, alpha).endVertex();
buffer.vertex(mat, f, f, f).color(r, g, b, alpha).endVertex();
buffer.vertex(mat, f, f, z).color(r, g, b, alpha).endVertex();
buffer.vertex(mat, x, f, z).color(r, g, b, alpha).endVertex();
Matrix4f mat = ms.getLast().getMatrix();
buffer.pos(mat, x, f, f).color(r, g, b, alpha).endVertex();
buffer.pos(mat, f, f, f).color(r, g, b, alpha).endVertex();
buffer.pos(mat, f, f, z).color(r, g, b, alpha).endVertex();
buffer.pos(mat, x, f, z).color(r, g, b, alpha).endVertex();
if (inner) {
x += f;
z += f;
float f1 = f + f / 4F;
alpha *= 2;
buffer.vertex(mat, x, f1, 0).color(r, g, b, alpha).endVertex();
buffer.vertex(mat, 0, f1, 0).color(r, g, b, alpha).endVertex();
buffer.vertex(mat, 0, f1, z).color(r, g, b, alpha).endVertex();
buffer.vertex(mat, x, f1, z).color(r, g, b, alpha).endVertex();
buffer.pos(mat, x, f1, 0).color(r, g, b, alpha).endVertex();
buffer.pos(mat, 0, f1, 0).color(r, g, b, alpha).endVertex();
buffer.pos(mat, 0, f1, z).color(r, g, b, alpha).endVertex();
buffer.pos(mat, x, f1, z).color(r, g, b, alpha).endVertex();
}
ms.pop();
@@ -180,15 +180,15 @@ public final class BlockHighlightRenderHandler {
radius -= f;
IVertexBuilder buffer = buffers.getBuffer(RenderHelper.CIRCLE);
Matrix4f mat = ms.peek().getModel();
Matrix4f mat = ms.getLast().getMatrix();
Runnable centerFunc = () -> buffer.vertex(mat, 0, f, 0).color(r, g, b, alpha).endVertex();
Runnable centerFunc = () -> buffer.pos(mat, 0, f, 0).color(r, g, b, alpha).endVertex();
List<Runnable> vertexFuncs = new ArrayList<>();
for (int i = 0; i < totalAngles + 1; i += step) {
double rad = (totalAngles - i) * Math.PI / 180.0;
float xp = (float) (Math.cos(rad) * radius);
float zp = (float) (Math.sin(rad) * radius);
vertexFuncs.add(() -> buffer.vertex(mat, xp, f, zp).color(r, g, b, alpha).endVertex());
vertexFuncs.add(() -> buffer.pos(mat, xp, f, zp).color(r, g, b, alpha).endVertex());
}
RenderHelper.triangleFan(centerFunc, vertexFuncs);
@@ -196,13 +196,13 @@ public final class BlockHighlightRenderHandler {
float f1 = f + f / 4F;
int alpha2 = 64;
centerFunc = () -> buffer.vertex(mat, 0, f1, 0).color(r, g, b, alpha2).endVertex();
centerFunc = () -> buffer.pos(mat, 0, f1, 0).color(r, g, b, alpha2).endVertex();
vertexFuncs.clear();
for (int i = 0; i < totalAngles + 1; i += step) {
double rad = (totalAngles - i) * Math.PI / 180.0;
float xp = (float) (Math.cos(rad) * radius);
float zp = (float) (Math.sin(rad) * radius);
vertexFuncs.add(() -> buffer.vertex(mat, xp, f1, zp).color(r, g, b, alpha2).endVertex());
vertexFuncs.add(() -> buffer.pos(mat, xp, f1, zp).color(r, g, b, alpha2).endVertex());
}
RenderHelper.triangleFan(centerFunc, vertexFuncs);
ms.pop();
@@ -54,7 +54,7 @@ public final class BossBarHandler {
Rectangle bgRect = currentBoss.getBossBarTextureRect();
Rectangle fgRect = currentBoss.getBossBarHPTextureRect();
String name = evt.getBossInfo().getName().getFormattedText();
int c = Minecraft.getInstance().getWindow().getScaledWidth() / 2;
int c = Minecraft.getInstance().getMainWindow().getScaledWidth() / 2;
int x = evt.getX();
int y = evt.getY();
int xf = x + (bgRect.width - fgRect.width) / 2;
@@ -101,8 +101,8 @@ public final class BossBarHandler {
int startXUniform = GlStateManager.getUniformLocation(shader, "startX");
int startYUniform = GlStateManager.getUniformLocation(shader, "startY");
GlStateManager.uniform1(startXUniform, x);
GlStateManager.uniform1(startYUniform, y);
GlStateManager.uniform1i(startXUniform, x);
GlStateManager.uniform1i(startYUniform, y);
if (callback != null) {
callback.call(shader);
@@ -54,12 +54,12 @@ import java.util.stream.Collectors;
@Mod.EventBusSubscriber(modid = LibMisc.MOD_ID, value = Dist.CLIENT)
public final class BoundTileRenderer {
private static final IRenderTypeBuffer.Impl LINE_BUFFERS = IRenderTypeBuffer.immediate(Util.make(() -> {
private static final IRenderTypeBuffer.Impl LINE_BUFFERS = IRenderTypeBuffer.getImpl(Util.make(() -> {
Map<RenderType, BufferBuilder> ret = new IdentityHashMap<>();
ret.put(RenderHelper.LINE_1_NO_DEPTH, new BufferBuilder(RenderHelper.LINE_1_NO_DEPTH.getExpectedBufferSize()));
ret.put(RenderHelper.LINE_4_NO_DEPTH, new BufferBuilder(RenderHelper.LINE_4_NO_DEPTH.getExpectedBufferSize()));
ret.put(RenderHelper.LINE_5_NO_DEPTH, new BufferBuilder(RenderHelper.LINE_5_NO_DEPTH.getExpectedBufferSize()));
ret.put(RenderHelper.LINE_8_NO_DEPTH, new BufferBuilder(RenderHelper.LINE_8_NO_DEPTH.getExpectedBufferSize()));
ret.put(RenderHelper.LINE_1_NO_DEPTH, new BufferBuilder(RenderHelper.LINE_1_NO_DEPTH.getBufferSize()));
ret.put(RenderHelper.LINE_4_NO_DEPTH, new BufferBuilder(RenderHelper.LINE_4_NO_DEPTH.getBufferSize()));
ret.put(RenderHelper.LINE_5_NO_DEPTH, new BufferBuilder(RenderHelper.LINE_5_NO_DEPTH.getBufferSize()));
ret.put(RenderHelper.LINE_8_NO_DEPTH, new BufferBuilder(RenderHelper.LINE_8_NO_DEPTH.getBufferSize()));
return ret;
}), Tessellator.getInstance().getBuffer());
@@ -116,7 +116,7 @@ public final class BoundTileRenderer {
ms.pop();
RenderSystem.disableDepthTest();
LINE_BUFFERS.draw();
LINE_BUFFERS.finish();
}
private static void renderBlockOutlineAt(MatrixStack ms, IRenderTypeBuffer buffers, BlockPos pos, int color) {
@@ -149,7 +149,7 @@ public final class BoundTileRenderer {
IVertexBuilder buffer = buffers.getBuffer(thick ? RenderHelper.LINE_5_NO_DEPTH : RenderHelper.LINE_1_NO_DEPTH);
for (AxisAlignedBB axis : list) {
axis = axis.offset(-pos.getX(), -pos.getY(), -(pos.getZ() + 1));
renderBlockOutline(ms.peek().getModel(), buffer, axis, color);
renderBlockOutline(ms.getLast().getMatrix(), buffer, axis, color);
}
buffer = buffers.getBuffer(thick ? RenderHelper.LINE_8_NO_DEPTH : RenderHelper.LINE_4_NO_DEPTH);
@@ -157,7 +157,7 @@ public final class BoundTileRenderer {
color = (color & ~0xff000000) | (alpha << 24);
for (AxisAlignedBB axis : list) {
axis = axis.offset(-pos.getX(), -pos.getY(), -(pos.getZ() + 1));
renderBlockOutline(ms.peek().getModel(), buffer, axis, color);
renderBlockOutline(ms.getLast().getMatrix(), buffer, axis, color);
}
}
@@ -176,40 +176,40 @@ public final class BoundTileRenderer {
int g = (color >> 8) & 0xFF;
int b = color & 0xFF;
buffer.vertex(mat, ix, iy, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, ay, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, iy, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, ay, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, ay, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, ay, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, ay, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, ay, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, ay, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, iy, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, ay, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, iy, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, iy, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, iy, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, iy, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, iy, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, iy, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, ay, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, iy, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, ay, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, iy, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, iy, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, iy, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, iy, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, iy, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, ay, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, iy, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, ay, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, ay, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, ay, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, ay, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, ay, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, iy, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, iy, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, iy, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, iy, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, ay, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ix, ay, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, ay, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ix, ay, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, iy, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, iy, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, iy, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, iy, az).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, ay, iz).color(r, g, b, a).endVertex();
buffer.vertex(mat, ax, ay, az).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, ay, iz).color(r, g, b, a).endVertex();
buffer.pos(mat, ax, ay, az).color(r, g, b, a).endVertex();
}
}
@@ -124,20 +124,20 @@ public final class ContributorFancinessHandler extends LayerRenderer<AbstractCli
private void renderGoldfish(MatrixStack ms, IRenderTypeBuffer buffers) {
ms.push();
getEntityModel().bipedHead.rotate(ms);
getEntityModel().bipedHead.translateRotate(ms);
ms.translate(-0.15F, -0.60F, 0F);
ms.scale(0.4F, -0.4F, -0.4F);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffers.getBuffer(Atlases.getEntityTranslucent()), null, MiscellaneousIcons.INSTANCE.goldfishModel, 1, 1, 1, 0xF000F0, OverlayTexture.DEFAULT_UV);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffers.getBuffer(Atlases.getTranslucentBlockType()), null, MiscellaneousIcons.INSTANCE.goldfishModel, 1, 1, 1, 0xF000F0, OverlayTexture.NO_OVERLAY);
ms.pop();
}
@SuppressWarnings("deprecation")
private void renderFlower(MatrixStack ms, IRenderTypeBuffer buffers, PlayerEntity player, ItemStack flower) {
ms.push();
getEntityModel().bipedHead.rotate(ms);
getEntityModel().bipedHead.translateRotate(ms);
ms.translate(0, -0.75, 0);
ms.scale(0.5F, -0.5F, -0.5F);
RenderHelper.renderItemModelGold(player, flower, ItemCameraTransforms.TransformType.NONE, ms, buffers, player.world, 0xF000F0, OverlayTexture.DEFAULT_UV);
RenderHelper.renderItemModelGold(player, flower, ItemCameraTransforms.TransformType.NONE, ms, buffers, player.world, 0xF000F0, OverlayTexture.NO_OVERLAY);
ms.pop();
}
@@ -240,8 +240,8 @@ public final class HUDHandler {
private static void renderManaInvBar(boolean hasCreative, int totalMana, int totalMaxMana) {
Minecraft mc = Minecraft.getInstance();
int width = 182;
int x = mc.getWindow().getScaledWidth() / 2 - width / 2;
int y = mc.getWindow().getScaledHeight() - ConfigHandler.CLIENT.manaBarHeight.get();
int x = mc.getMainWindow().getScaledWidth() / 2 - width / 2;
int y = mc.getMainWindow().getScaledHeight() - ConfigHandler.CLIENT.manaBarHeight.get();
if (!hasCreative) {
if (totalMaxMana == 0) {
@@ -280,8 +280,8 @@ public final class HUDHandler {
profiler.startSection("poolRecipe");
IManaInfusionRecipe recipe = tile.getMatchingRecipe(stack, tile.getWorld().getBlockState(tile.getPos().down()));
if (recipe != null) {
int x = mc.getWindow().getScaledWidth() / 2 - 11;
int y = mc.getWindow().getScaledHeight() / 2 + 10;
int x = mc.getMainWindow().getScaledWidth() / 2 - 11;
int y = mc.getMainWindow().getScaledHeight() / 2 + 10;
int u = tile.getCurrentMana() >= recipe.getManaToConsume() ? 0 : 22;
int v = mc.player.getName().getString().equals("haighyorkie") && mc.player.isSneaking() ? 23 : 8;
@@ -313,8 +313,8 @@ public final class HUDHandler {
String s1 = target.getDisplayName().getString();
String s2 = tile.getItemCount() + "x";
int strlen = Math.max(mc.fontRenderer.getStringWidth(s1), mc.fontRenderer.getStringWidth(s2));
int w = mc.getWindow().getScaledWidth();
int h = mc.getWindow().getScaledHeight();
int w = mc.getMainWindow().getScaledWidth();
int h = mc.getMainWindow().getScaledHeight();
int boxH = h / 2 + (tile.locked ? 20 : 10);
AbstractGui.fill(w / 2 + 8, h / 2 - 12, w / 2 + strlen + 32, boxH, 0x44000000);
AbstractGui.fill(w / 2 + 6, h / 2 - 14, w / 2 + strlen + 34, boxH + 2, 0x44000000);
@@ -338,8 +338,8 @@ public final class HUDHandler {
String txt2 = TextFormatting.GRAY + I18n.format("botaniamisc.nearIndex2");
int l = Math.max(mc.fontRenderer.getStringWidth(txt0), Math.max(mc.fontRenderer.getStringWidth(txt1), mc.fontRenderer.getStringWidth(txt2))) + 20;
int x = mc.getWindow().getScaledWidth() - l - 20;
int y = mc.getWindow().getScaledHeight() - 60;
int x = mc.getMainWindow().getScaledWidth() - l - 20;
int y = mc.getMainWindow().getScaledHeight() - 60;
AbstractGui.fill(x - 6, y - 6, x + l + 6, y + 37, 0x44000000);
AbstractGui.fill(x - 4, y - 4, x + l + 4, y + 35, 0x44000000);
@@ -355,12 +355,12 @@ public final class HUDHandler {
RenderSystem.enableBlend();
RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Minecraft mc = Minecraft.getInstance();
int x = mc.getWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(name) / 2;
int y = mc.getWindow().getScaledHeight() / 2 + 10;
int x = mc.getMainWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(name) / 2;
int y = mc.getMainWindow().getScaledHeight() / 2 + 10;
mc.fontRenderer.drawStringWithShadow(name, x, y, color);
x = mc.getWindow().getScaledWidth() / 2 - 51;
x = mc.getMainWindow().getScaledWidth() / 2 - 51;
y += 10;
renderManaBar(x, y, color, 1F, mana, maxMana);
@@ -373,8 +373,8 @@ public final class HUDHandler {
Minecraft mc = Minecraft.getInstance();
int x = mc.getWindow().getScaledWidth() / 2 + 55;
int y = mc.getWindow().getScaledHeight() / 2 + 12;
int x = mc.getMainWindow().getScaledWidth() / 2 + 55;
int y = mc.getMainWindow().getScaledHeight() / 2 + 12;
RenderSystem.enableRescaleNormal();
mc.getItemRenderer().renderItemAndEffectIntoGUI(bindDisplay, x, y);
@@ -42,8 +42,8 @@ public final class ItemsRemainingRenderHandler {
if (ticks > 0 && !stack.isEmpty()) {
int pos = maxTicks - ticks;
Minecraft mc = Minecraft.getInstance();
int x = mc.getWindow().getScaledWidth() / 2 + 10 + Math.max(0, pos - leaveTicks);
int y = mc.getWindow().getScaledHeight() / 2;
int x = mc.getMainWindow().getScaledWidth() / 2 + 10 + Math.max(0, pos - leaveTicks);
int y = mc.getMainWindow().getScaledHeight() / 2;
int start = maxTicks - leaveTicks;
float alpha = ticks + partTicks > start ? 1F : (ticks + partTicks) / start;
@@ -39,13 +39,13 @@ public class LayerTerraHelmet extends LayerRenderer<AbstractClientPlayerEntity,
if (!helm.isEmpty() && helm.getItem() instanceof ItemTerrasteelHelm) {
if (ItemTerrasteelHelm.hasAnyWill(helm) && !((ItemTerrasteelArmor) helm.getItem()).hasPhantomInk(helm)) {
ms.push();
getEntityModel().bipedHead.rotate(ms);
getEntityModel().bipedHead.translateRotate(ms);
ms.translate(-0.2, -0.15, -0.3);
ms.scale(0.4F, -0.4F, -0.4F);
IBakedModel model = MiscellaneousIcons.INSTANCE.terrasteelHelmWillModel;
IVertexBuilder buffer = buffers.getBuffer(Atlases.getEntityCutout());
IVertexBuilder buffer = buffers.getBuffer(Atlases.getCutoutBlockType());
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer()
.render(ms.peek(), buffer, null, model, 1, 1, 1, light, OverlayTexture.DEFAULT_UV);
.renderModelBrightnessColor(ms.getLast(), buffer, null, model, 1, 1, 1, light, OverlayTexture.NO_OVERLAY);
ms.pop();
}
}
@@ -52,9 +52,9 @@ public class LightningHandler {
Entity entity = Minecraft.getInstance().player;
TextureManager render = Minecraft.getInstance().textureManager;
double interpPosX = entity.lastTickPosX + (entity.getX() - entity.lastTickPosX) * frame;
double interpPosY = entity.lastTickPosY + (entity.getY() - entity.lastTickPosY) * frame;
double interpPosZ = entity.lastTickPosZ + (entity.getZ() - entity.lastTickPosZ) * frame;
double interpPosX = entity.lastTickPosX + (entity.getPosX() - entity.lastTickPosX) * frame;
double interpPosY = entity.lastTickPosY + (entity.getPosY() - entity.lastTickPosY) * frame;
double interpPosZ = entity.lastTickPosZ + (entity.getPosZ() - entity.lastTickPosZ) * frame;
RenderSystem.pushMatrix();
RenderSystem.translated(-interpPosX, -interpPosY, -interpPosZ);
@@ -68,12 +68,12 @@ public class LightningHandler {
render.bindTexture(outsideResource);
int counter = 0;
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEXTURE_LIGHT_COLOR);
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_LIGHTMAP_COLOR);
for (FXLightning bolt : queuedLightningBolts) {
bolt.renderBolt(0, false);
if (counter % BATCH_THRESHOLD == BATCH_THRESHOLD - 1) {
tessellator.draw();
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEXTURE_LIGHT_COLOR);
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_LIGHTMAP_COLOR);
}
counter++;
}
@@ -82,12 +82,12 @@ public class LightningHandler {
render.bindTexture(insideResource);
counter = 0;
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEXTURE_LIGHT_COLOR);
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_LIGHTMAP_COLOR);
for (FXLightning bolt : queuedLightningBolts) {
bolt.renderBolt(1, true);
if (counter % BATCH_THRESHOLD == BATCH_THRESHOLD - 1) {
tessellator.draw();
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEXTURE_LIGHT_COLOR);
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_LIGHTMAP_COLOR);
}
counter++;
}
@@ -93,8 +93,8 @@ public class MiscellaneousIcons {
materials.add(RenderLexicon.ELVEN_TEXTURE);
for (BannerPattern pattern : BannerPattern.values()) {
if (pattern.getFileName().startsWith(LibMisc.MOD_ID)) {
materials.add(new Material(Atlases.SHIELD_PATTERNS_ATLAS_TEXTURE, pattern.getSpriteId(false)));
materials.add(new Material(Atlases.BANNER_PATTERNS_ATLAS_TEXTURE, pattern.getSpriteId(true)));
materials.add(new Material(Atlases.SHIELD_ATLAS, pattern.func_226957_a_(false)));
materials.add(new Material(Atlases.BANNER_ATLAS, pattern.func_226957_a_(true)));
}
}
ModelLoader.addSpecialModel(prefix("icon/goldfish"));
@@ -189,7 +189,7 @@ public class MiscellaneousIcons {
@SubscribeEvent
public void onTextureStitchPre(TextureStitchEvent.Pre evt) {
if (!evt.getMap().getId().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE)) {
if (!evt.getMap().getTextureLocation().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE)) {
return;
}
@@ -228,7 +228,7 @@ public class MiscellaneousIcons {
@SubscribeEvent
public void onTextureStitchPost(TextureStitchEvent.Post evt) {
if (!evt.getMap().getId().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE)) {
if (!evt.getMap().getTextureLocation().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE)) {
return;
}
@@ -128,12 +128,12 @@ public class RenderLexicon {
if (side == HandSide.RIGHT) {
ms.translate(0.3F + 0.02F * ticks, 0.125F + 0.01F * ticks, -0.2F - 0.035F * ticks);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180F + ticks * 6));
ms.rotate(Vector3f.YP.rotationDegrees(180F + ticks * 6));
} else {
ms.translate(0.1F - 0.02F * ticks, 0.125F + 0.01F * ticks, -0.2F - 0.035F * ticks);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(200F + ticks * 10));
ms.rotate(Vector3f.YP.rotationDegrees(200F + ticks * 10));
}
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(-0.3F + ticks * 2.85F));
ms.rotate(Vector3f.ZP.rotationDegrees(-0.3F + ticks * 2.85F));
float opening = MathHelper.clamp(ticks / 12F, 0, 1);
float pageFlipTicks = ClientTickHandler.pageFlipTicks;
@@ -143,27 +143,27 @@ public class RenderLexicon {
float pageFlip = pageFlipTicks / 5F;
float leftPageAngle = MathHelper.fractionalPart(pageFlip + 0.25F) * 1.6F - 0.3F;
float rightPageAngle = MathHelper.fractionalPart(pageFlip + 0.75F) * 1.6F - 0.3F;
model.setPageAngles(ClientTickHandler.total, MathHelper.clamp(leftPageAngle, 0.0F, 1.0F), MathHelper.clamp(rightPageAngle, 0.0F, 1.0F), opening);
float leftPageAngle = MathHelper.frac(pageFlip + 0.25F) * 1.6F - 0.3F;
float rightPageAngle = MathHelper.frac(pageFlip + 0.75F) * 1.6F - 0.3F;
model.func_228247_a_(ClientTickHandler.total, MathHelper.clamp(leftPageAngle, 0.0F, 1.0F), MathHelper.clamp(rightPageAngle, 0.0F, 1.0F), opening);
Material mat = ((ItemLexicon) ModItems.lexicon).isElvenItem(stack) ? ELVEN_TEXTURE : TEXTURE;
IVertexBuilder buffer = mat.getVertexConsumer(buffers, RenderType::getEntitySolid);
model.render(ms, buffer, light, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
IVertexBuilder buffer = mat.getBuffer(buffers, RenderType::getEntitySolid);
model.render(ms, buffer, light, OverlayTexture.NO_OVERLAY, 1, 1, 1, 1);
if (ticks < 3) {
FontRenderer font = Minecraft.getInstance().fontRenderer;
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180F));
ms.rotate(Vector3f.ZP.rotationDegrees(180F));
ms.translate(-0.30F, -0.24F, -0.07F);
ms.scale(0.0030F, 0.0030F, -0.0030F);
String title = ItemLexicon.getTitle(stack).getFormattedText();
font.draw(font.trimStringToWidth(title, 80), 0, 0, 0xD69700, false, ms.peek().getModel(), buffers, false, 0, light);
font.renderString(font.trimStringToWidth(title, 80), 0, 0, 0xD69700, false, ms.getLast().getMatrix(), buffers, false, 0, light);
ms.translate(0F, 10F, 0F);
ms.scale(0.6F, 0.6F, 0.6F);
String edition = ItemLexicon.getEdition().applyTextStyles(TextFormatting.ITALIC, TextFormatting.BOLD).getFormattedText();
font.draw(edition, 0, 0, 0xA07100, false, ms.peek().getModel(), buffers, false, 0, light);
font.renderString(edition, 0, 0, 0xA07100, false, ms.getLast().getMatrix(), buffers, false, 0, light);
if (quote == -1) {
quote = mc.world.rand.nextInt(QUOTES.length);
@@ -172,21 +172,21 @@ public class RenderLexicon {
String quoteStr = QUOTES[quote];
ms.translate(-5F, 15F, 0F);
renderText(0, 0, 140, 100, 0, 0x79ff92, quoteStr, ms.peek().getModel(), buffers, light);
renderText(0, 0, 140, 100, 0, 0x79ff92, quoteStr, ms.getLast().getMatrix(), buffers, light);
ms.translate(8F, 110F, 0F);
String blurb = I18n.format("botaniamisc.lexiconcover0");
font.draw(blurb, 0, 0, 0x79ff92, false, ms.peek().getModel(), buffers, false, 0, light);
font.renderString(blurb, 0, 0, 0x79ff92, false, ms.getLast().getMatrix(), buffers, false, 0, light);
ms.translate(0F, 10F, 0F);
String blurb2 = TextFormatting.UNDERLINE + "" + TextFormatting.ITALIC + I18n.format("botaniamisc.lexiconcover1");
font.draw(blurb2, 0, 0, 0x79ff92, false, ms.peek().getModel(), buffers, false, 0, light);
font.renderString(blurb2, 0, 0, 0x79ff92, false, ms.getLast().getMatrix(), buffers, false, 0, light);
ms.translate(0F, -30F, 0F);
String authorTitle = I18n.format("botaniamisc.lexiconcover2");
int len = font.getStringWidth(authorTitle);
font.draw(authorTitle, 58 - len / 2F, -8, 0xD69700, false, ms.peek().getModel(), buffers, false, 0, light);
font.renderString(authorTitle, 58 - len / 2F, -8, 0xD69700, false, ms.getLast().getMatrix(), buffers, false, 0, light);
}
ms.pop();
@@ -252,7 +252,7 @@ public class RenderLexicon {
compensationSpaces--;
extra++;
}
font.draw(s, xi, y, color, false, matrix, buffers, false, 0, light);
font.renderString(s, xi, y, color, false, matrix, buffers, false, 0, light);
xi += font.getStringWidth(s) + spacing + extra;
}
@@ -19,11 +19,11 @@ public final class IconHelper {
* Draw an icon into the buffer, using the {@link RenderHelper#ICON_OVERLAY} vertex format
*/
public static void renderIcon(MatrixStack ms, IVertexBuilder buffer, int x, int y, TextureAtlasSprite icon, int width, int height, float alpha) {
Matrix4f mat = ms.peek().getModel();
Matrix4f mat = ms.getLast().getMatrix();
int fullbright = 0xF000F0;
buffer.vertex(mat, x, y + height, 0).color(1, 1, 1, alpha).texture(icon.getMinU(), icon.getMaxV()).light(fullbright).endVertex();
buffer.vertex(mat, x + width, y + height, 0).color(1, 1, 1, alpha).texture(icon.getMaxU(), icon.getMaxV()).light(fullbright).endVertex();
buffer.vertex(mat, x + width, y, 0).color(1, 1, 1, alpha).texture(icon.getMaxU(), icon.getMinV()).light(fullbright).endVertex();
buffer.vertex(mat, x, y, 0).color(1, 1, 1, alpha).texture(icon.getMinU(), icon.getMinV()).light(fullbright).endVertex();
buffer.pos(mat, x, y + height, 0).color(1, 1, 1, alpha).tex(icon.getMinU(), icon.getMaxV()).lightmap(fullbright).endVertex();
buffer.pos(mat, x + width, y + height, 0).color(1, 1, 1, alpha).tex(icon.getMaxU(), icon.getMaxV()).lightmap(fullbright).endVertex();
buffer.pos(mat, x + width, y, 0).color(1, 1, 1, alpha).tex(icon.getMaxU(), icon.getMinV()).lightmap(fullbright).endVertex();
buffer.pos(mat, x, y, 0).color(1, 1, 1, alpha).tex(icon.getMinU(), icon.getMinV()).lightmap(fullbright).endVertex();
}
}
@@ -98,49 +98,49 @@ public final class RenderHelper {
RenderState.DepthTestState noDepth = new RenderState.DepthTestState(GL11.GL_ALWAYS);
boolean useShaders = ShaderHelper.useShaders();
RenderType.State glState = RenderType.State.builder().shadeModel(smoothShade)
.writeMaskState(colorMask)
RenderType.State glState = RenderType.State.getBuilder().shadeModel(smoothShade)
.writeMask(colorMask)
.transparency(lightningTransparency)
.build(false);
STAR = RenderType.of(LibResources.PREFIX_MOD + "star", DefaultVertexFormats.POSITION_COLOR, GL11.GL_TRIANGLES, 256, false, false, glState);
STAR = RenderType.makeType(LibResources.PREFIX_MOD + "star", DefaultVertexFormats.POSITION_COLOR, GL11.GL_TRIANGLES, 256, false, false, glState);
glState = RenderType.State.builder().transparency(TRANSLUCENT_TRANSPARENCY).cull(disableCull).build(false);
RECTANGLE = RenderType.of(LibResources.PREFIX_MOD + "rectangle_highlight", DefaultVertexFormats.POSITION_COLOR, GL11.GL_QUADS, 256, false, true, glState);
CIRCLE = RenderType.of(LibResources.PREFIX_MOD + "circle_highlight", DefaultVertexFormats.POSITION_COLOR, GL11.GL_TRIANGLES, 256, false, false, glState);
glState = RenderType.State.getBuilder().transparency(TRANSLUCENT_TRANSPARENCY).cull(disableCull).build(false);
RECTANGLE = RenderType.makeType(LibResources.PREFIX_MOD + "rectangle_highlight", DefaultVertexFormats.POSITION_COLOR, GL11.GL_QUADS, 256, false, true, glState);
CIRCLE = RenderType.makeType(LibResources.PREFIX_MOD + "circle_highlight", DefaultVertexFormats.POSITION_COLOR, GL11.GL_TRIANGLES, 256, false, false, glState);
glState = RenderType.State.builder().lineWidth(new RenderState.LineState(OptionalDouble.of(1))).layering(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMaskState(colorMask).build(false);
LINE_1 = RenderType.of(LibResources.PREFIX_MOD + "line_1", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 128, glState);
glState = RenderType.State.builder().lineWidth(new RenderState.LineState(OptionalDouble.of(1))).layering(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMaskState(colorMask).depthTest(noDepth).build(false);
LINE_1_NO_DEPTH = RenderType.of(LibResources.PREFIX_MOD + "line_1_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 128, glState);
glState = RenderType.State.builder().lineWidth(new RenderState.LineState(OptionalDouble.of(4))).layering(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMaskState(colorMask).depthTest(noDepth).build(false);
LINE_4_NO_DEPTH = RenderType.of(LibResources.PREFIX_MOD + "line_4_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 128, glState);
glState = RenderType.State.builder().lineWidth(new RenderState.LineState(OptionalDouble.of(5))).layering(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMaskState(colorMask).depthTest(noDepth).build(false);
LINE_5_NO_DEPTH = RenderType.of(LibResources.PREFIX_MOD + "line_5_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 64, glState);
glState = RenderType.State.builder().lineWidth(new RenderState.LineState(OptionalDouble.of(8))).layering(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMaskState(colorMask).depthTest(noDepth).build(false);
LINE_8_NO_DEPTH = RenderType.of(LibResources.PREFIX_MOD + "line_8_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 64, glState);
glState = RenderType.State.getBuilder().line(new RenderState.LineState(OptionalDouble.of(1))).layer(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMask(colorMask).build(false);
LINE_1 = RenderType.makeType(LibResources.PREFIX_MOD + "line_1", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 128, glState);
glState = RenderType.State.getBuilder().line(new RenderState.LineState(OptionalDouble.of(1))).layer(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMask(colorMask).depthTest(noDepth).build(false);
LINE_1_NO_DEPTH = RenderType.makeType(LibResources.PREFIX_MOD + "line_1_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 128, glState);
glState = RenderType.State.getBuilder().line(new RenderState.LineState(OptionalDouble.of(4))).layer(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMask(colorMask).depthTest(noDepth).build(false);
LINE_4_NO_DEPTH = RenderType.makeType(LibResources.PREFIX_MOD + "line_4_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 128, glState);
glState = RenderType.State.getBuilder().line(new RenderState.LineState(OptionalDouble.of(5))).layer(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMask(colorMask).depthTest(noDepth).build(false);
LINE_5_NO_DEPTH = RenderType.makeType(LibResources.PREFIX_MOD + "line_5_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 64, glState);
glState = RenderType.State.getBuilder().line(new RenderState.LineState(OptionalDouble.of(8))).layer(projectionLayering).transparency(TRANSLUCENT_TRANSPARENCY).writeMask(colorMask).depthTest(noDepth).build(false);
LINE_8_NO_DEPTH = RenderType.makeType(LibResources.PREFIX_MOD + "line_8_no_depth", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, 64, glState);
glState = RenderType.State.builder().texture(mipmapBlockAtlasTexture).transparency(TRANSLUCENT_TRANSPARENCY).alpha(new RenderState.AlphaState(0.05F)).lightmap(enableLightmap).build(true);
glState = RenderType.State.getBuilder().texture(mipmapBlockAtlasTexture).transparency(TRANSLUCENT_TRANSPARENCY).alpha(new RenderState.AlphaState(0.05F)).lightmap(enableLightmap).build(true);
// todo 1.15: need normals?
SPARK = RenderType.of(LibResources.PREFIX_MOD + "spark", DefaultVertexFormats.POSITION_COLOR_TEXTURE_LIGHT, GL11.GL_QUADS, 256, glState);
RenderType lightRelay = RenderType.of(LibResources.PREFIX_MOD + "light_relay", DefaultVertexFormats.POSITION_COLOR_TEXTURE_LIGHT, GL11.GL_QUADS, 64, glState);
SPARK = RenderType.makeType(LibResources.PREFIX_MOD + "spark", DefaultVertexFormats.POSITION_COLOR_TEX_LIGHTMAP, GL11.GL_QUADS, 256, glState);
RenderType lightRelay = RenderType.makeType(LibResources.PREFIX_MOD + "light_relay", DefaultVertexFormats.POSITION_COLOR_TEX_LIGHTMAP, GL11.GL_QUADS, 64, glState);
LIGHT_RELAY = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.HALO, null, lightRelay) : lightRelay;
glState = RenderType.State.builder().texture(new RenderState.TextureState()).build(false);
SPINNING_CUBE = RenderType.of(LibResources.PREFIX_MOD + "spinning_cube", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, GL11.GL_QUADS, 64, glState);
glState = RenderType.State.getBuilder().texture(new RenderState.TextureState()).build(false);
SPINNING_CUBE = RenderType.makeType(LibResources.PREFIX_MOD + "spinning_cube", DefaultVertexFormats.ENTITY, GL11.GL_QUADS, 64, glState);
glState = RenderType.State.builder().texture(new RenderState.TextureState()).transparency(TRANSLUCENT_TRANSPARENCY).build(false);
SPINNING_CUBE_GHOST = RenderType.of(LibResources.PREFIX_MOD + "spinning_cube_ghost", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, GL11.GL_QUADS, 64, glState);
glState = RenderType.State.getBuilder().texture(new RenderState.TextureState()).transparency(TRANSLUCENT_TRANSPARENCY).build(false);
SPINNING_CUBE_GHOST = RenderType.makeType(LibResources.PREFIX_MOD + "spinning_cube_ghost", DefaultVertexFormats.ENTITY, GL11.GL_QUADS, 64, glState);
glState = RenderType.State.builder().texture(mipmapBlockAtlasTexture)
glState = RenderType.State.getBuilder().texture(mipmapBlockAtlasTexture)
.transparency(TRANSLUCENT_TRANSPARENCY)
.diffuseLighting(new RenderState.DiffuseLightingState(true))
.alpha(oneTenthAlpha)
.lightmap(enableLightmap).build(true);
ICON_OVERLAY = RenderType.of(LibResources.PREFIX_MOD + "icon_overlay", DefaultVertexFormats.POSITION_COLOR_TEXTURE_LIGHT, GL11.GL_QUADS, 128, glState);
ICON_OVERLAY = RenderType.makeType(LibResources.PREFIX_MOD + "icon_overlay", DefaultVertexFormats.POSITION_COLOR_TEX_LIGHTMAP, GL11.GL_QUADS, 128, glState);
RenderState.TextureState babylonTexture = new RenderState.TextureState(new ResourceLocation(LibResources.MISC_BABYLON), false, true);
glState = RenderType.State.builder().texture(babylonTexture).transparency(TRANSLUCENT_TRANSPARENCY).cull(disableCull).shadeModel(smoothShade).build(true);
RenderType babylonIcon = RenderType.of(LibResources.PREFIX_MOD + "babylon", DefaultVertexFormats.POSITION_COLOR_TEXTURE, GL11.GL_QUADS, 64, glState);
glState = RenderType.State.getBuilder().texture(babylonTexture).transparency(TRANSLUCENT_TRANSPARENCY).cull(disableCull).shadeModel(smoothShade).build(true);
RenderType babylonIcon = RenderType.makeType(LibResources.PREFIX_MOD + "babylon", DefaultVertexFormats.POSITION_COLOR_TEX, GL11.GL_QUADS, 64, glState);
BABYLON_ICON = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.HALO, null, babylonIcon) : babylonIcon;
MANA_POOL_WATER = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.MANA_POOL, null, ICON_OVERLAY) : ICON_OVERLAY;
@@ -148,49 +148,49 @@ public final class RenderHelper {
ENCHANTER = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.ENCHANTER_RUNE, null, ICON_OVERLAY) : ICON_OVERLAY;
RenderState.TextureState haloTexture = new RenderState.TextureState(ItemFlightTiara.textureHalo, false, true);
glState = RenderType.State.builder().texture(haloTexture)
glState = RenderType.State.getBuilder().texture(haloTexture)
.transparency(TRANSLUCENT_TRANSPARENCY)
.diffuseLighting(new RenderState.DiffuseLightingState(true))
.alpha(oneTenthAlpha)
.cull(disableCull)
.build(true);
RenderType halo = RenderType.of(LibResources.PREFIX_MOD + "halo", DefaultVertexFormats.POSITION_TEX, GL11.GL_QUADS, 64, glState);
RenderType halo = RenderType.makeType(LibResources.PREFIX_MOD + "halo", DefaultVertexFormats.POSITION_TEX, GL11.GL_QUADS, 64, glState);
HALO = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.HALO, null, halo) : halo;
glState = RenderType.State.builder().texture(new RenderState.TextureState(RenderTilePylon.MANA_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(zeroAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
RenderType manaPylonGlow = RenderType.of(LibResources.PREFIX_MOD + "mana_pylon_glow", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, GL11.GL_QUADS, 128, glState);
glState = RenderType.State.getBuilder().texture(new RenderState.TextureState(RenderTilePylon.MANA_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(zeroAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
RenderType manaPylonGlow = RenderType.makeType(LibResources.PREFIX_MOD + "mana_pylon_glow", DefaultVertexFormats.ENTITY, GL11.GL_QUADS, 128, glState);
MANA_PYLON_GLOW = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.PYLON_GLOW, null, manaPylonGlow) : manaPylonGlow;
glState = RenderType.State.builder().texture(new RenderState.TextureState(RenderTilePylon.NATURA_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(zeroAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
RenderType naturaPylonGlow = RenderType.of(LibResources.PREFIX_MOD + "natura_pylon_glow", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, GL11.GL_QUADS, 128, glState);
glState = RenderType.State.getBuilder().texture(new RenderState.TextureState(RenderTilePylon.NATURA_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(zeroAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
RenderType naturaPylonGlow = RenderType.makeType(LibResources.PREFIX_MOD + "natura_pylon_glow", DefaultVertexFormats.ENTITY, GL11.GL_QUADS, 128, glState);
NATURA_PYLON_GLOW = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.PYLON_GLOW, null, naturaPylonGlow) : naturaPylonGlow;
glState = RenderType.State.builder().texture(new RenderState.TextureState(RenderTilePylon.GAIA_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(zeroAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
RenderType gaiaPylonGlow = RenderType.of(LibResources.PREFIX_MOD + "gaia_pylon_glow", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, GL11.GL_QUADS, 128, glState);
glState = RenderType.State.getBuilder().texture(new RenderState.TextureState(RenderTilePylon.GAIA_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(zeroAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
RenderType gaiaPylonGlow = RenderType.makeType(LibResources.PREFIX_MOD + "gaia_pylon_glow", DefaultVertexFormats.ENTITY, GL11.GL_QUADS, 128, glState);
GAIA_PYLON_GLOW = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.PYLON_GLOW, null, gaiaPylonGlow) : gaiaPylonGlow;
// Same as entity_translucent, with no depth test and a shader
glState = RenderType.State.builder().depthTest(new RenderState.DepthTestState(GL11.GL_ALWAYS)).texture(new RenderState.TextureState(AtlasTexture.LOCATION_BLOCKS_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(oneTenthAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
glState = RenderType.State.getBuilder().depthTest(new RenderState.DepthTestState(GL11.GL_ALWAYS)).texture(new RenderState.TextureState(AtlasTexture.LOCATION_BLOCKS_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(oneTenthAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
ShaderCallback cb = shader -> {
int alpha = GlStateManager.getUniformLocation(shader, "alpha");
ShaderHelper.FLOAT_BUF.position(0);
ShaderHelper.FLOAT_BUF.put(0, 0.4F);
GlStateManager.uniform1(alpha, ShaderHelper.FLOAT_BUF);
GlStateManager.uniform1f(alpha, ShaderHelper.FLOAT_BUF);
};
RenderType astrolabePreview = RenderType.of(LibResources.PREFIX_MOD + "astrolabe_preview", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256, true, true, glState);
RenderType astrolabePreview = RenderType.makeType(LibResources.PREFIX_MOD + "astrolabe_preview", DefaultVertexFormats.ENTITY, 7, 256, true, true, glState);
ASTROLABE_PREVIEW = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.ALPHA, cb, astrolabePreview) : astrolabePreview;
glState = RenderType.State.builder().texture(new RenderState.TextureState(AtlasTexture.LOCATION_BLOCKS_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(oneTenthAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
RenderType gold = RenderType.of(LibResources.PREFIX_MOD + "entity_translucent_gold", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, GL11.GL_QUADS, 128, true, true, glState);
glState = RenderType.State.getBuilder().texture(new RenderState.TextureState(AtlasTexture.LOCATION_BLOCKS_TEXTURE, false, false)).transparency(TRANSLUCENT_TRANSPARENCY).diffuseLighting(enableDiffuse).alpha(oneTenthAlpha).cull(disableCull).lightmap(enableLightmap).overlay(enableOverlay).build(true);
RenderType gold = RenderType.makeType(LibResources.PREFIX_MOD + "entity_translucent_gold", DefaultVertexFormats.ENTITY, GL11.GL_QUADS, 128, true, true, glState);
ENTITY_TRANSLUCENT_GOLD = useShaders ? new ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader.GOLD, null, gold) : gold;
}
public static RenderType getHaloLayer(ResourceLocation texture) {
RenderType.State glState = RenderType.State.builder()
RenderType.State glState = RenderType.State.getBuilder()
.texture(new RenderState.TextureState(texture, true, false))
.cull(new RenderState.CullState(false))
.transparency(TRANSLUCENT_TRANSPARENCY).build(false);
return RenderType.of(LibResources.PREFIX_MOD + "crafting_halo", DefaultVertexFormats.POSITION_COLOR_TEXTURE, GL11.GL_QUADS, 64, false, true, glState);
return RenderType.makeType(LibResources.PREFIX_MOD + "crafting_halo", DefaultVertexFormats.POSITION_COLOR_TEX, GL11.GL_QUADS, 64, false, true, glState);
}
public static void drawTexturedModalRect(int x, int y, int u, int v, int width, int height) {
@@ -213,24 +213,24 @@ public final class RenderHelper {
ms.scale(xScale, yScale, zScale);
for (int i = 0; i < (f1 + f1 * f1) / 2F * 90F + 30F; i++) {
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(random.nextFloat() * 360F));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(random.nextFloat() * 360F));
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(random.nextFloat() * 360F));
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(random.nextFloat() * 360F));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(random.nextFloat() * 360F));
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(random.nextFloat() * 360F + f1 * 90F));
ms.rotate(Vector3f.XP.rotationDegrees(random.nextFloat() * 360F));
ms.rotate(Vector3f.YP.rotationDegrees(random.nextFloat() * 360F));
ms.rotate(Vector3f.ZP.rotationDegrees(random.nextFloat() * 360F));
ms.rotate(Vector3f.XP.rotationDegrees(random.nextFloat() * 360F));
ms.rotate(Vector3f.YP.rotationDegrees(random.nextFloat() * 360F));
ms.rotate(Vector3f.ZP.rotationDegrees(random.nextFloat() * 360F + f1 * 90F));
float f3 = random.nextFloat() * 20F + 5F + f2 * 10F;
float f4 = random.nextFloat() * 2F + 1F + f2 * 2F;
float r = ((color & 0xFF0000) >> 16) / 255F;
float g = ((color & 0xFF00) >> 8) / 255F;
float b = (color & 0xFF) / 255F;
Matrix4f mat = ms.peek().getModel();
Runnable center = () -> buffer.vertex(mat, 0, 0, 0).color(r, g, b, 1F - f2).endVertex();
Matrix4f mat = ms.getLast().getMatrix();
Runnable center = () -> buffer.pos(mat, 0, 0, 0).color(r, g, b, 1F - f2).endVertex();
Runnable[] vertices = {
() -> buffer.vertex(mat, -0.866F * f4, f3, -0.5F * f4).color(0, 0, 0, 0).endVertex(),
() -> buffer.vertex(mat, 0.866F * f4, f3, -0.5F * f4).color(0, 0, 0, 0).endVertex(),
() -> buffer.vertex(mat, 0, f3, 1F * f4).color(0, 0, 0, 0).endVertex(),
() -> buffer.vertex(mat, -0.866F * f4, f3, -0.5F * f4).color(0, 0, 0, 0).endVertex()
() -> buffer.pos(mat, -0.866F * f4, f3, -0.5F * f4).color(0, 0, 0, 0).endVertex(),
() -> buffer.pos(mat, 0.866F * f4, f3, -0.5F * f4).color(0, 0, 0, 0).endVertex(),
() -> buffer.pos(mat, 0, f3, 1F * f4).color(0, 0, 0, 0).endVertex(),
() -> buffer.pos(mat, -0.866F * f4, f3, -0.5F * f4).color(0, 0, 0, 0).endVertex()
};
triangleFan(center, vertices);
}
@@ -286,14 +286,14 @@ public final class RenderHelper {
BufferBuilder buf = Tessellator.getInstance().getBuffer();
buf.begin(GL11.GL_TRIANGLE_FAN, DefaultVertexFormats.POSITION_COLOR);
buf.vertex(centerX, centerY, 0).color(0, 0.5F, 0.5F, a).endVertex();
buf.pos(centerX, centerY, 0).color(0, 0.5F, 0.5F, a).endVertex();
for (int i = degs; i > 0; i--) {
double rad = (i - 90) / 180F * Math.PI;
buf.vertex(centerX + Math.cos(rad) * r, centerY + Math.sin(rad) * r, 0).color(0F, 1F, 0.5F, a).endVertex();
buf.pos(centerX + Math.cos(rad) * r, centerY + Math.sin(rad) * r, 0).color(0F, 1F, 0.5F, a).endVertex();
}
buf.vertex(centerX, centerY, 0).color(0F, 1F, 0.5F, a).endVertex();
buf.pos(centerX, centerY, 0).color(0F, 1F, 0.5F, a).endVertex();
Tessellator.getInstance().draw();
RenderSystem.disableBlend();
@@ -327,9 +327,9 @@ public final class RenderHelper {
model = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ms, model, ItemCameraTransforms.TransformType.NONE, false);
ms.translate(-0.5D, -0.5D, -0.5D);
if (!model.isBuiltInRenderer()) {
RenderType rendertype = RenderTypeLookup.getItemLayer(stack);
RenderType rendertype = RenderTypeLookup.getRenderType(stack);
IVertexBuilder ivertexbuilder = ItemRenderer.getArmorVertexConsumer(buffers, rendertype, true, stack.hasEffect());
IVertexBuilder ivertexbuilder = ItemRenderer.getBuffer(buffers, rendertype, true, stack.hasEffect());
renderBakedItemModel(model, stack, color, light, overlay, ms, ivertexbuilder);
} else {
stack.getItem().getItemStackTileEntityRenderer().render(stack, ms, buffers, light, overlay);
@@ -358,7 +358,7 @@ public final class RenderHelper {
// [VanillaCopy] ItemRenderer, with custom color + alpha support
private static void renderBakedItemQuads(MatrixStack ms, IVertexBuilder buffer, int color, List<BakedQuad> quads, ItemStack stack, int light, int overlay) {
MatrixStack.Entry matrixstack$entry = ms.peek();
MatrixStack.Entry matrixstack$entry = ms.getLast();
for (BakedQuad bakedquad : quads) {
int i = color;
@@ -390,7 +390,7 @@ public final class RenderHelper {
ibakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ms, ibakedmodel, transform, false);
ms.translate(-0.5D, -0.5D, -0.5D);
if (!ibakedmodel.isBuiltInRenderer() && (stack.getItem() != Items.TRIDENT || flag1)) {
IVertexBuilder ivertexbuilder = ItemRenderer.getArmorVertexConsumer(buffers, ENTITY_TRANSLUCENT_GOLD, true, stack.hasEffect());
IVertexBuilder ivertexbuilder = ItemRenderer.getBuffer(buffers, ENTITY_TRANSLUCENT_GOLD, true, stack.hasEffect());
try {
RENDER_BAKED_ITEM_MODEL.invokeExact(ir, ibakedmodel, stack, light, overlay, ms, ivertexbuilder);
} catch (Throwable ex) {
@@ -103,10 +103,10 @@ public final class ShaderHelper {
}
int program = prog.getProgram();
ShaderLinkHelper.useProgram(program);
ShaderLinkHelper.func_227804_a_(program);
int time = GlStateManager.getUniformLocation(program, "time");
GlStateManager.uniform1(time, ClientTickHandler.ticksInGame);
GlStateManager.uniform1i(time, ClientTickHandler.ticksInGame);
if (callback != null) {
callback.call(program);
@@ -118,7 +118,7 @@ public final class ShaderHelper {
}
public static void releaseShader() {
ShaderLinkHelper.useProgram(0);
ShaderLinkHelper.func_227804_a_(0);
}
public static boolean useShaders() {
@@ -24,14 +24,14 @@ public class ShaderWrappedRenderLayer extends RenderType {
@Nullable private final ShaderCallback cb;
public ShaderWrappedRenderLayer(ShaderHelper.BotaniaShader shader, @Nullable ShaderCallback cb, RenderType delegate) {
super(LibResources.PREFIX_MOD + delegate.toString() + "_with_" + shader.name(), delegate.getVertexFormat(), delegate.getDrawMode(), delegate.getExpectedBufferSize(), delegate.func_228665_s_(), true,
super(LibResources.PREFIX_MOD + delegate.toString() + "_with_" + shader.name(), delegate.getVertexFormat(), delegate.getDrawMode(), delegate.getBufferSize(), delegate.isUseDelegate(), true,
() -> {
delegate.startDrawing();
delegate.setupRenderState();
ShaderHelper.useShader(shader, cb);
},
() -> {
ShaderHelper.releaseShader();
delegate.endDrawing();
delegate.clearRenderState();
});
this.delegate = delegate;
this.shader = shader;
@@ -39,8 +39,8 @@ public class ShaderWrappedRenderLayer extends RenderType {
}
@Override
public Optional<RenderType> getAffectedOutline() {
return delegate.getAffectedOutline();
public Optional<RenderType> getOutline() {
return delegate.getOutline();
}
@Override
@@ -161,8 +161,8 @@ public class ClientProxy implements IProxy {
ColorHandler.init();
// Needed to prevent mana pools on carts from X-raying through the cart
SortedMap<RenderType, BufferBuilder> layers = ObfuscationReflectionHelper.getPrivateValue(RenderTypeBuffers.class, Minecraft.getInstance().getBufferBuilders(), "field_228480_b_");
layers.put(RenderHelper.MANA_POOL_WATER, new BufferBuilder(RenderHelper.MANA_POOL_WATER.getExpectedBufferSize()));
SortedMap<RenderType, BufferBuilder> layers = ObfuscationReflectionHelper.getPrivateValue(RenderTypeBuffers.class, Minecraft.getInstance().getRenderTypeBuffers(), "field_228480_b_");
layers.put(RenderHelper.MANA_POOL_WATER, new BufferBuilder(RenderHelper.MANA_POOL_WATER.getBufferSize()));
});
}
@@ -77,7 +77,7 @@ public class FXLightning extends Particle {
}
@Override
public void buildGeometry(IVertexBuilder buffer, ActiveRenderInfo info, float partialTicks) {
public void renderParticle(IVertexBuilder buffer, ActiveRenderInfo info, float partialTicks) {
LightningHandler.queuedLightningBolts.offer(this);
}
@@ -124,27 +124,27 @@ public class FXLightning extends Particle {
int b = color & 0xFF;
int a = (int) (mainAlpha * rendersegment.light * 0xFF);
wr.vertex(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z).texture(0.5F, 0).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z).texture(0.5F, 0).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z).texture(0.5F, 1).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z).texture(0.5F, 1).light(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z).tex(0.5F, 0).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z).tex(0.5F, 0).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z).tex(0.5F, 1).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z).tex(0.5F, 1).lightmap(0xF000F0).color(r, g, b, a).endVertex();
if (rendersegment.next == null) {
Vector3 roundend = rendersegment.endPoint.point.add(rendersegment.diff.normalize().multiply(width));
wr.vertex(roundend.x - diff2.x, roundend.y - diff2.y, roundend.z - diff2.z).texture(0, 0).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z).texture(0.5F, 0).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z).texture(0.5F, 1).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(roundend.x + diff2.x, roundend.y + diff2.y, roundend.z + diff2.z).texture(0, 1).light(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(roundend.x - diff2.x, roundend.y - diff2.y, roundend.z - diff2.z).tex(0, 0).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z).tex(0.5F, 0).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z).tex(0.5F, 1).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(roundend.x + diff2.x, roundend.y + diff2.y, roundend.z + diff2.z).tex(0, 1).lightmap(0xF000F0).color(r, g, b, a).endVertex();
}
if (rendersegment.prev == null) {
Vector3 roundend = rendersegment.startPoint.point.subtract(rendersegment.diff.normalize().multiply(width));
wr.vertex(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z).texture(0.5F, 0).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(roundend.x - diff1.x, roundend.y - diff1.y, roundend.z - diff1.z).texture(0, 0).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(roundend.x + diff1.x, roundend.y + diff1.y, roundend.z + diff1.z).texture(0, 1).light(0xF000F0).color(r, g, b, a).endVertex();
wr.vertex(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z).texture(0.5F, 1).light(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z).tex(0.5F, 0).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(roundend.x - diff1.x, roundend.y - diff1.y, roundend.z - diff1.z).tex(0, 0).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(roundend.x + diff1.x, roundend.y + diff1.y, roundend.z + diff1.z).tex(0, 1).lightmap(0xF000F0).color(r, g, b, a).endVertex();
wr.pos(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z).tex(0.5F, 1).lightmap(0xF000F0).color(r, g, b, a).endVertex();
}
}
}
@@ -278,7 +278,7 @@ public class FXLightning extends Particle {
private static Vector3 getRelativeViewVector(Vector3 pos) {
Entity renderEntity = Minecraft.getInstance().getRenderViewEntity();
return new Vector3((float) renderEntity.getX() - pos.x, (float) renderEntity.getY() + renderEntity.getEyeHeight() - pos.y, (float) renderEntity.getZ() - pos.z);
return new Vector3((float) renderEntity.getPosX() - pos.x, (float) renderEntity.getPosY() + renderEntity.getEyeHeight() - pos.y, (float) renderEntity.getPosZ() - pos.z);
}
}
@@ -121,7 +121,7 @@ public class FXSparkle extends SpriteTexturedParticle {
for (Direction direction1 : new Direction[] { Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST, Direction.UP }) {
blockpos$mutable.setPos(blockpos).move(direction1);
if (!this.world.getBlockState(blockpos$mutable).isFullCube(this.world, blockpos$mutable)) {
if (!this.world.getBlockState(blockpos$mutable).isCollisionShapeOpaque(this.world, blockpos$mutable)) {
double d1 = vec3d.getCoordinate(direction1.getAxis());
double d2 = direction1.getAxisDirection() == Direction.AxisDirection.POSITIVE ? 1.0D - d1 : d1;
if (d2 < d0) {
@@ -43,7 +43,7 @@ public class GuiBaubleBox extends ContainerScreen<ContainerBaubleBox> {
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getInstance().getTextureManager().bindTexture(texture);
blit(guiLeft, guiTop, 0, 0, xSize, ySize);
InventoryScreen.drawEntity(guiLeft + 31, guiTop + 75, 30, guiLeft + 31 - this.mouseX, guiTop + 75 - 50 - this.mouseY, this.minecraft.player);
InventoryScreen.drawEntityOnScreen(guiLeft + 31, guiTop + 75, 30, guiLeft + 31 - this.mouseX, guiTop + 75 - 50 - this.mouseY, this.minecraft.player);
}
}
@@ -115,10 +115,10 @@ public class ElvenTradeRecipeCategory implements IRecipeCategory<IElvenTradeReci
int startY = 25;
int stopX = 70;
int stopY = 73;
wr.vertex(startX, startY, 0).texture(sprite.getMinU(), sprite.getMinV()).endVertex();
wr.vertex(startX, stopY, 0).texture(sprite.getMinU(), sprite.getMaxV()).endVertex();
wr.vertex(stopX, stopY, 0).texture(sprite.getMaxU(), sprite.getMaxV()).endVertex();
wr.vertex(stopX, startY, 0).texture(sprite.getMaxU(), sprite.getMinV()).endVertex();
wr.pos(startX, startY, 0).tex(sprite.getMinU(), sprite.getMinV()).endVertex();
wr.pos(startX, stopY, 0).tex(sprite.getMinU(), sprite.getMaxV()).endVertex();
wr.pos(stopX, stopY, 0).tex(sprite.getMaxU(), sprite.getMaxV()).endVertex();
wr.pos(stopX, startY, 0).tex(sprite.getMaxU(), sprite.getMinV()).endVertex();
tess.draw();
}
@@ -72,10 +72,10 @@ public class FloatingFlowerModel implements IModelGeometry<FloatingFlowerModel>
Set<Material> ret = new HashSet<>();
for (Map.Entry<IFloatingFlower.IslandType, ResourceLocation> e : BotaniaAPIClient.instance().getRegisteredIslandTypeModels().entrySet()) {
IUnbakedModel unbakedIsland = modelGetter.apply(e.getValue());
ret.addAll(unbakedIsland.getTextureDependencies(modelGetter, missingTextureErrors));
ret.addAll(unbakedIsland.getTextures(modelGetter, missingTextureErrors));
unbakedIslands.put(e.getKey(), unbakedIsland);
}
ret.addAll(unbakedFlower.getTextureDependencies(modelGetter, missingTextureErrors));
ret.addAll(unbakedFlower.getTextures(modelGetter, missingTextureErrors));
return ret;
}
@@ -84,11 +84,11 @@ public class FloatingFlowerModel implements IModelGeometry<FloatingFlowerModel>
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery, Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform transform, ItemOverrideList overrides, ResourceLocation name) {
final TransformationMatrix moveFlower = new TransformationMatrix(new Vector3f(0F, 0.2F, 0F), null, new Vector3f(0.5F, 0.5F, 0.5F), null);
IModelTransform comp = new ModelTransformComposition(new SimpleModelTransform(moveFlower), transform);
IBakedModel bakedFlower = unbakedFlower.bake(bakery, spriteGetter, comp, name);
IBakedModel bakedFlower = unbakedFlower.bakeModel(bakery, spriteGetter, comp, name);
Map<IFloatingFlower.IslandType, IBakedModel> bakedIslands = new HashMap<>();
for (Map.Entry<IFloatingFlower.IslandType, IUnbakedModel> e : unbakedIslands.entrySet()) {
IBakedModel bakedIsland = e.getValue().bake(bakery, spriteGetter, transform, name);
IBakedModel bakedIsland = e.getValue().bakeModel(bakery, spriteGetter, transform, name);
bakedIslands.put(e.getKey(), bakedIsland);
}
return new Baked(bakedFlower, bakedIslands);
@@ -127,8 +127,8 @@ public class GunModel implements IBakedModel {
}
@Override
public boolean isSideLit() {
return originalModel.isSideLit();
public boolean func_230044_c_() {
return originalModel.func_230044_c_();
}
private final HashMap<Pair<Item, Boolean>, CompositeBakedModel> cache = new HashMap<>();
@@ -147,7 +147,7 @@ public class GunModel implements IBakedModel {
super(gun);
IUnbakedModel lensUnbaked = bakery.getUnbakedModel(new ModelResourceLocation(lens.getItem().getRegistryName(), "inventory"));
IModelTransform transform = new SimpleModelTransform(new TransformationMatrix(new Vector3f(-0.4F, 0.2F, 0.0F), Vector3f.POSITIVE_Y.getRadialQuaternion((float) Math.PI / 2), new Vector3f(0.625F, 0.625F, 0.625F), null));
IModelTransform transform = new SimpleModelTransform(new TransformationMatrix(new Vector3f(-0.4F, 0.2F, 0.0F), Vector3f.YP.rotation((float) Math.PI / 2), new Vector3f(0.625F, 0.625F, 0.625F), null));
ResourceLocation name = prefix("gun_with_" + lens.getItem().getRegistryName().toString().replace(':', '_'));
IBakedModel lensBaked;
@@ -155,9 +155,9 @@ public class GunModel implements IBakedModel {
BlockModel bm = (BlockModel) lensUnbaked;
lensBaked = new ItemModelGenerator()
.makeItemModel(ModelLoader.defaultTextureGetter(), bm)
.bake(bakery, bm, ModelLoader.defaultTextureGetter(), transform, name, false);
.bakeModel(bakery, bm, ModelLoader.defaultTextureGetter(), transform, name, false);
} else {
lensBaked = lensUnbaked.bake(bakery, ModelLoader.defaultTextureGetter(), transform, name);
lensBaked = lensUnbaked.bakeModel(bakery, ModelLoader.defaultTextureGetter(), transform, name);
}
for (Direction e : Direction.values()) {
@@ -66,8 +66,8 @@ public class LexiconModel implements IBakedModel {
}
@Override
public boolean isSideLit() {
return original.isSideLit();
public boolean func_230044_c_() {
return original.func_230044_c_();
}
@Nonnull
@@ -31,25 +31,25 @@ public class ModelAvatar extends Model {
leftleg = new ModelRenderer(this, 0, 20);
leftleg.mirror = true;
leftleg.setRotationPoint(1.5F, 18.0F, -0.5F);
leftleg.addCuboid(-1.5F, 0.0F, -1.5F, 3, 6, 3, 0.0F);
leftleg.addBox(-1.5F, 0.0F, -1.5F, 3, 6, 3, 0.0F);
rightarm = new ModelRenderer(this, 0, 20);
rightarm.setRotationPoint(-3.0F, 15.0F, -1.0F);
rightarm.addCuboid(-2.0F, -1.0F, -1.0F, 2, 6, 3, 0.0F);
rightarm.addBox(-2.0F, -1.0F, -1.0F, 2, 6, 3, 0.0F);
setRotateAngle(rightarm, 0.0F, -0.0F, 0.08726646259971647F);
leftarm = new ModelRenderer(this, 0, 20);
leftarm.mirror = true;
leftarm.setRotationPoint(3.0F, 15.0F, -1.0F);
leftarm.addCuboid(0.0F, -1.0F, -1.0F, 2, 6, 3, 0.0F);
leftarm.addBox(0.0F, -1.0F, -1.0F, 2, 6, 3, 0.0F);
setRotateAngle(leftarm, 0.0F, -0.0F, -0.08726646259971647F);
head = new ModelRenderer(this, 0, 0);
head.setRotationPoint(0.0F, 14.0F, 0.0F);
head.addCuboid(-3.0F, -6.0F, -3.0F, 6, 6, 6, 0.0F);
head.addBox(-3.0F, -6.0F, -3.0F, 6, 6, 6, 0.0F);
rightleg = new ModelRenderer(this, 0, 20);
rightleg.setRotationPoint(-1.5F, 18.0F, -0.5F);
rightleg.addCuboid(-1.5F, 0.0F, -1.5F, 3, 6, 3, 0.0F);
rightleg.addBox(-1.5F, 0.0F, -1.5F, 3, 6, 3, 0.0F);
body = new ModelRenderer(this, 0, 12);
body.setRotationPoint(0.0F, 14.0F, 0.0F);
body.addCuboid(-3.0F, 0.0F, -2.0F, 6, 4, 4, 0.0F);
body.addBox(-3.0F, 0.0F, -2.0F, 6, 4, 4, 0.0F);
}
@Override
@@ -30,17 +30,17 @@ public class ModelBellows extends Model {
top = new ModelRenderer(this, 0, 0);
top.setRotationPoint(0.0F, 16.0F, 0.0F);
top.addCuboid(-4.0F, -2.0F, -4.0F, 8, 1, 8, 0.0F);
top.addBox(-4.0F, -2.0F, -4.0F, 8, 1, 8, 0.0F);
base = new ModelRenderer(this, 0, 9);
base.setRotationPoint(0.0F, 16.0F, 0.0F);
base.addCuboid(-5.0F, 6.0F, -5.0F, 10, 2, 10, 0.0F);
base.addBox(-5.0F, 6.0F, -5.0F, 10, 2, 10, 0.0F);
pipe = new ModelRenderer(this, 0, 21);
pipe.setRotationPoint(0.0F, 16.0F, 0.0F);
pipe.addCuboid(-1.0F, 6.0F, -8.0F, 2, 2, 3, 0.0F);
pipe.addBox(-1.0F, 6.0F, -8.0F, 2, 2, 3, 0.0F);
funnel = new ModelRenderer(this, 40, 0);
funnel.setRotationPoint(0.0F, 0.0F, 0.0F);
funnel.addCuboid(0.0F, 0.0F, 0.0F, 6, 7, 6, 0.0F);
funnel.addBox(0.0F, 0.0F, 0.0F, 6, 7, 6, 0.0F);
}
@Override
@@ -58,7 +58,7 @@ public class ModelBellows extends Model {
top.render(ms, buffer, light, overlay, r, g, b, alpha);
ms.translate(0F, -mov, 0F);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(180F));
ms.rotate(Vector3f.XP.rotationDegrees(180F));
ms.translate(-0.19F, -1.375F, -0.19F);
ms.scale(1F, fract, 1F);
funnel.render(ms, buffer, light, overlay, r, g, b, alpha);
@@ -43,17 +43,17 @@ public class ModelBrewery extends Model {
top = new ModelRenderer(this, 8, 0);
top.setRotationPoint(0.0F, 16.0F, 0.0F);
top.addCuboid(-2.0F, -7.0F, -2.0F, 4, 1, 4, 0.0F);
top.addBox(-2.0F, -7.0F, -2.0F, 4, 1, 4, 0.0F);
pole = new ModelRenderer(this, 0, 0);
pole.setRotationPoint(0.0F, 16.0F, 0.0F);
pole.addCuboid(-1.0F, -6.0F, -1.0F, 2, 10, 2, 0.0F);
pole.addBox(-1.0F, -6.0F, -1.0F, 2, 10, 2, 0.0F);
bottom = new ModelRenderer(this, 8, 5);
bottom.setRotationPoint(0.0F, 16.0F, 0.0F);
bottom.addCuboid(-2.0F, 4.0F, -2.0F, 4, 1, 4, 0.0F);
bottom.addBox(-2.0F, 4.0F, -2.0F, 4, 1, 4, 0.0F);
plate = new ModelRenderer(this, 8, 5);
plate.setRotationPoint(0.0F, 17.0F, 0.0F);
plate.addCuboid(5.0F, 0.0F, -2.0F, 4, 1, 4, 0.0F);
plate.addBox(5.0F, 0.0F, -2.0F, 4, 1, 4, 0.0F);
}
public void render(@Nullable TileBrewery brewery, double time, MatrixStack ms, IRenderTypeBuffer buffers, int light, int overlay) {
@@ -64,20 +64,20 @@ public class ModelBrewery extends Model {
float polerot = -deg * 25F;
ms.translate(0F, offset, 0F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(polerot));
ms.rotate(Vector3f.YP.rotationDegrees(polerot));
if (hasTile && !brewery.getItemHandler().getStackInSlot(0).isEmpty()) {
ms.push();
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(180));
ms.rotate(Vector3f.XP.rotationDegrees(180));
ms.translate(0, -0.45F, 0);
renderItemStack(brewery.getItemHandler().getStackInSlot(0), ms, buffers, light, overlay);
ms.pop();
}
RenderType layer = getLayer(TEXTURE);
RenderType layer = getRenderType(TEXTURE);
pole.render(ms, buffers.getBuffer(layer), light, overlay);
top.render(ms, buffers.getBuffer(layer), light, overlay);
bottom.render(ms, buffers.getBuffer(layer), light, overlay);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-polerot));
ms.rotate(Vector3f.YP.rotationDegrees(-polerot));
float degper = (float) (2F * Math.PI) / plates;
for (int i = 0; i < plates; i++) {
@@ -94,9 +94,9 @@ public class ModelBrewery extends Model {
float transY = 1.06F;
float transZ = 0.1245F;
ms.push();
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(rot));
ms.rotate(Vector3f.YP.rotationDegrees(rot));
ms.translate(transX, transY, transZ);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(-90F));
ms.rotate(Vector3f.XP.rotationDegrees(-90F));
ms.translate(0.125F, 0.125F, 0);
renderItemStack(brewery.getItemHandler().getStackInSlot(i + 1), ms, buffers, light, overlay);
ms.pop();
@@ -34,16 +34,16 @@ public class ModelCloak extends Model {
collar = new ModelRenderer(this, 0, 0);
collar.setRotationPoint(0.0F, -3.0F, -4.5F);
collar.addCuboid(-5.5F, 0.0F, -1.5F, 11, 5, 11, s);
collar.addBox(-5.5F, 0.0F, -1.5F, 11, 5, 11, s);
setRotateAngle(collar, 0.08726646259971647F, 0.0F, 0.0F);
sideL = new ModelRenderer(this, 0, 16);
sideL.mirror = true;
sideL.setRotationPoint(0.0F, 0.0F, 0.0F);
sideL.addCuboid(-0.5F, -0.5F, -5.5F, 11, 21, 10, s);
sideL.addBox(-0.5F, -0.5F, -5.5F, 11, 21, 10, s);
setRotateAngle(sideL, 0.08726646259971647F, -0.08726646259971647F, -0.17453292519943295F);
sideR = new ModelRenderer(this, 0, 16);
sideR.setRotationPoint(0.0F, 0.0F, 0.0F);
sideR.addCuboid(-10.5F, -0.5F, -5.5F, 11, 21, 10, s);
sideR.addBox(-10.5F, -0.5F, -5.5F, 11, 21, 10, s);
setRotateAngle(sideR, 0.08726646259971647F, 0.08726646259971647F, 0.17453292519943295F);
}
@@ -35,26 +35,26 @@ public class ModelHourglass extends Model {
top = new ModelRenderer(this, 20, 0);
top.setRotationPoint(0.0F, 0.0F, 0.0F);
top.addCuboid(-3.0F, -6.5F, -3.0F, 6, 1, 6, 0.0F);
top.addBox(-3.0F, -6.5F, -3.0F, 6, 1, 6, 0.0F);
glassT = new ModelRenderer(this, 0, 0);
glassT.setRotationPoint(0.0F, 0.0F, 0.0F);
glassT.addCuboid(-2.5F, -5.5F, -2.5F, 5, 5, 5, 0.0F);
glassT.addBox(-2.5F, -5.5F, -2.5F, 5, 5, 5, 0.0F);
ring = new ModelRenderer(this, 0, 20);
ring.setRotationPoint(0.0F, 0.0F, 0.0F);
ring.addCuboid(-1.5F, -0.5F, -1.5F, 3, 1, 3, 0.0F);
ring.addBox(-1.5F, -0.5F, -1.5F, 3, 1, 3, 0.0F);
glassB = new ModelRenderer(this, 0, 10);
glassB.setRotationPoint(0.0F, 0.0F, 0.0F);
glassB.addCuboid(-2.5F, 0.5F, -2.5F, 5, 5, 5, 0.0F);
glassB.addBox(-2.5F, 0.5F, -2.5F, 5, 5, 5, 0.0F);
bottom = new ModelRenderer(this, 20, 7);
bottom.setRotationPoint(0.0F, 0.0F, 0.0F);
bottom.addCuboid(-3.0F, 5.5F, -3.0F, 6, 1, 6, 0.0F);
bottom.addBox(-3.0F, 5.5F, -3.0F, 6, 1, 6, 0.0F);
sandT = new ModelRenderer(this, 20, 14);
sandT.setRotationPoint(0.0F, 0.0F, 0.0F);
sandT.addCuboid(0.0F, 0.0F, 0.0F, 4, 4, 4, 0.0F); // -2.0F, -5.0F, -2.0F
sandT.addBox(0.0F, 0.0F, 0.0F, 4, 4, 4, 0.0F); // -2.0F, -5.0F, -2.0F
sandB = new ModelRenderer(this, 20, 14);
sandB.setRotationPoint(0.0F, 0.0F, 0.0F);
sandB.addCuboid(0.0F, 0.0F, 0.0F, 4, 4, 4, 0.0F); // -2.0F, 1.0F, -2.05F
sandB.addBox(0.0F, 0.0F, 0.0F, 4, 4, 4, 0.0F); // -2.0F, 1.0F, -2.05F
}
@Override
@@ -79,7 +79,7 @@ public class ModelHourglass extends Model {
if (flip) {
ms.translate(-2.0F * f, 1.0F * f, -2.0F * f);
} else {
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180F));
ms.rotate(Vector3f.ZP.rotationDegrees(180F));
ms.translate(-2.0F * f, -5.0F * f, -2.0F * f);
}
ms.scale(1F, fract1, 1F);
@@ -92,7 +92,7 @@ public class ModelHourglass extends Model {
if (flip) {
ms.translate(-2.0F * f, -5.0F * f, -2.0F * f);
} else {
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180F));
ms.rotate(Vector3f.ZP.rotationDegrees(180F));
ms.translate(-2.0F * f, 1.0F * f, -2.0F * f);
}
ms.scale(1F, fract2, 1F);
@@ -45,23 +45,23 @@ public class ModelPixie extends EntityModel<EntityPixie> {
body = new ModelRenderer(this, 0, 0);
body.setRotationPoint(0.0F, 16.0F, 0.0F);
body.addCuboid(-2.5F, 0.0F, -2.5F, 5, 5, 5, 0.0F);
body.addBox(-2.5F, 0.0F, -2.5F, 5, 5, 5, 0.0F);
leftWingT = new ModelRenderer(this, 0, 4);
leftWingT.setRotationPoint(2.5F, 18.0F, 0.5F);
leftWingT.addCuboid(0.0F, -5.0F, 0.0F, 0, 5, 6, 0.0F);
leftWingT.addBox(0.0F, -5.0F, 0.0F, 0, 5, 6, 0.0F);
setRotateAngle(leftWingT, 0.2617993877991494F, 0.5235987755982988F, 0.2617993877991494F);
leftWingB = new ModelRenderer(this, 0, 11);
leftWingB.setRotationPoint(2.5F, 18.0F, 0.5F);
leftWingB.addCuboid(0.0F, 0.0F, 0.0F, 0, 3, 4, 0.0F);
leftWingB.addBox(0.0F, 0.0F, 0.0F, 0, 3, 4, 0.0F);
setRotateAngle(leftWingB, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
rightWingT = new ModelRenderer(this, 0, 4);
rightWingT.setRotationPoint(-2.5F, 18.0F, 0.5F);
rightWingT.addCuboid(0.0F, -5.0F, 0.0F, 0, 5, 6, 0.0F);
rightWingT.addBox(0.0F, -5.0F, 0.0F, 0, 5, 6, 0.0F);
setRotateAngle(rightWingT, 0.2617993877991494F, -0.5235987755982988F, -0.2617993877991494F);
rightWingB = new ModelRenderer(this, 0, 11);
rightWingB.setRotationPoint(-2.5F, 18.0F, 0.5F);
rightWingB.addCuboid(0.0F, 0.0F, 0.0F, 0, 3, 4, 0.0F);
rightWingB.addBox(0.0F, 0.0F, 0.0F, 0, 3, 4, 0.0F);
setRotateAngle(rightWingB, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
}
@@ -82,7 +82,7 @@ public class ModelPixie extends EntityModel<EntityPixie> {
}
@Override
public void setAngles(EntityPixie entity, float f, float f1, float f2, float f3, float f4) {
public void setRotationAngles(EntityPixie entity, float f, float f1, float f2, float f3, float f4) {
evil = entity.getPixieType() == 1;
rightWingT.rotateAngleY = -(MathHelper.cos(f2 * 1.7F) * (float) Math.PI * 0.5F);
leftWingT.rotateAngleY = MathHelper.cos(f2 * 1.7F) * (float) Math.PI * 0.5F;
@@ -41,46 +41,46 @@ public class ModelPylonGaia extends Model implements IPylonModel {
//plates
platel = new ModelRenderer(this, 36, 0);
platel.setRotationPoint(0.0F, 16.0F, 0.0F);
platel.addCuboid(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
platel.addBox(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
setRotation(platel, 0.0F, 1.5707963267948966F, 0.0F);
plater = new ModelRenderer(this, 36, 0);
plater.setRotationPoint(0.0F, 16.0F, 0.0F);
plater.addCuboid(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
plater.addBox(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
setRotation(plater, 0.0F, -1.5707963267948966F, 0.0F);
platef = new ModelRenderer(this, 36, 0);
platef.setRotationPoint(0.0F, 16.0F, 0.0F);
platef.addCuboid(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
platef.addBox(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
plateb = new ModelRenderer(this, 36, 0);
plateb.setRotationPoint(0.0F, 16.0F, 0.0F);
plateb.addCuboid(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
plateb.addBox(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
setRotation(plateb, 0.0F, 3.141592653589793F, 0.0F);
//shards
shardrft = new ModelRenderer(this, 16, 32);
shardrft.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrft.addCuboid(2.0F, -6.0F, -5.0F, 3, 2, 3, 0.0F);
shardrft.addBox(2.0F, -6.0F, -5.0F, 3, 2, 3, 0.0F);
shardlbt = new ModelRenderer(this, 0, 0);
shardlbt.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlbt.addCuboid(-5.0F, -6.0F, 0.0F, 6, 5, 5, 0.0F);
shardlbt.addBox(-5.0F, -6.0F, 0.0F, 6, 5, 5, 0.0F);
shardrbt = new ModelRenderer(this, 22, 9);
shardrbt.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrbt.addCuboid(3.0F, -5.0F, 0.0F, 2, 4, 5, 0.0F);
shardrbt.addBox(3.0F, -5.0F, 0.0F, 2, 4, 5, 0.0F);
shardlft = new ModelRenderer(this, 0, 32);
shardlft.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlft.addCuboid(-5.0F, -7.0F, -5.0F, 5, 6, 3, 0.0F);
shardlft.addBox(-5.0F, -7.0F, -5.0F, 5, 6, 3, 0.0F);
shardrfb = new ModelRenderer(this, 16, 37);
shardrfb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrfb.addCuboid(2.0F, -2.0F, -5.0F, 3, 6, 3, 0.0F);
shardrfb.addBox(2.0F, -2.0F, -5.0F, 3, 6, 3, 0.0F);
shardlbb = new ModelRenderer(this, 0, 10);
shardlbb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlbb.addCuboid(-5.0F, 1.0F, 0.0F, 6, 3, 5, 0.0F);
shardlbb.addBox(-5.0F, 1.0F, 0.0F, 6, 3, 5, 0.0F);
shardrbb = new ModelRenderer(this, 22, 0);
shardrbb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrbb.addCuboid(3.0F, 1.0F, 0.0F, 2, 4, 5, 0.0F);
shardrbb.addBox(3.0F, 1.0F, 0.0F, 2, 4, 5, 0.0F);
shardlfb = new ModelRenderer(this, 0, 41);
shardlfb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlfb.addCuboid(-5.0F, 1.0F, -5.0F, 5, 2, 3, 0.0F);
shardlfb.addBox(-5.0F, 1.0F, -5.0F, 5, 2, 3, 0.0F);
}
@Override
@@ -36,33 +36,33 @@ public class ModelPylonMana extends Model implements IPylonModel {
//plates
platef = new ModelRenderer(this, 36, 0);
platef.setRotationPoint(0.0F, 16.0F, 0.0F);
platef.addCuboid(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
platef.addBox(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
plateb = new ModelRenderer(this, 36, 0);
plateb.setRotationPoint(0.0F, 16.0F, 0.0F);
plateb.addCuboid(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
plateb.addBox(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
setRotation(plateb, 0.0F, 3.141592653589793F, 0.0F);
platel = new ModelRenderer(this, 36, 0);
platel.setRotationPoint(0.0F, 16.0F, 0.0F);
platel.addCuboid(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
platel.addBox(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
setRotation(platel, 0.0F, 1.5707963267948966F, 0.0F);
plater = new ModelRenderer(this, 36, 0);
plater.setRotationPoint(0.0F, 16.0F, 0.0F);
plater.addCuboid(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
plater.addBox(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
setRotation(plater, 0.0F, -1.5707963267948966F, 0.0F);
//shards
shardlf = new ModelRenderer(this, 0, 21);
shardlf.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlf.addCuboid(-5.0F, -9.0F, -5.0F, 5, 16, 3, 0.0F);
shardlf.addBox(-5.0F, -9.0F, -5.0F, 5, 16, 3, 0.0F);
shardrf = new ModelRenderer(this, 16, 21);
shardrf.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrf.addCuboid(2.0F, -12.0F, -5.0F, 3, 16, 3, 0.0F);
shardrf.addBox(2.0F, -12.0F, -5.0F, 3, 16, 3, 0.0F);
shardlb = new ModelRenderer(this, 0, 0);
shardlb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlb.addCuboid(-5.0F, -10.0F, 0.0F, 6, 16, 5, 0.0F);
shardlb.addBox(-5.0F, -10.0F, 0.0F, 6, 16, 5, 0.0F);
shardrb = new ModelRenderer(this, 22, 0);
shardrb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrb.addCuboid(3.0F, -11.0F, 0.0F, 2, 16, 5, 0.0F);
shardrb.addBox(3.0F, -11.0F, 0.0F, 2, 16, 5, 0.0F);
}
@Override
@@ -41,46 +41,46 @@ public class ModelPylonNatura extends Model implements IPylonModel {
//plates
platef = new ModelRenderer(this, 36, 0);
platef.setRotationPoint(0.0F, 16.0F, 0.0F);
platef.addCuboid(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
platef.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
plateb = new ModelRenderer(this, 36, 0);
plateb.setRotationPoint(0.0F, 16.0F, 0.0F);
plateb.addCuboid(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
plateb.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
setRotation(plateb, 0.0F, 3.141592653589793F, 0.0F);
platel = new ModelRenderer(this, 36, 0);
platel.setRotationPoint(0.0F, 16.0F, 0.0F);
platel.addCuboid(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
platel.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
setRotation(platel, 0.0F, 1.5707963267948966F, 0.0F);
plater = new ModelRenderer(this, 36, 0);
plater.setRotationPoint(0.0F, 16.0F, 0.0F);
plater.addCuboid(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
plater.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
setRotation(plater, 0.0F, -1.5707963267948966F, 0.0F);
//shards
shardrft = new ModelRenderer(this, 16, 32);
shardrft.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrft.addCuboid(2.0F, -13.0F, -5.0F, 3, 7, 3, 0.0F);
shardrft.addBox(2.0F, -13.0F, -5.0F, 3, 7, 3, 0.0F);
shardlbt = new ModelRenderer(this, 0, 0);
shardlbt.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlbt.addCuboid(-5.0F, -11.0F, 0.0F, 6, 9, 5, 0.0F);
shardlbt.addBox(-5.0F, -11.0F, 0.0F, 6, 9, 5, 0.0F);
shardrbt = new ModelRenderer(this, 22, 0);
shardrbt.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrbt.addCuboid(3.0F, -12.0F, 0.0F, 2, 8, 5, 0.0F);
shardrbt.addBox(3.0F, -12.0F, 0.0F, 2, 8, 5, 0.0F);
shardlft = new ModelRenderer(this, 0, 32);
shardlft.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlft.addCuboid(-5.0F, -10.0F, -5.0F, 5, 10, 3, 0.0F);
shardlft.addBox(-5.0F, -10.0F, -5.0F, 5, 10, 3, 0.0F);
shardrfb = new ModelRenderer(this, 16, 42);
shardrfb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrfb.addCuboid(2.0F, -4.0F, -5.0F, 3, 9, 3, 0.0F);
shardrfb.addBox(2.0F, -4.0F, -5.0F, 3, 9, 3, 0.0F);
shardlbb = new ModelRenderer(this, 0, 14);
shardlbb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlbb.addCuboid(-5.0F, 0.0F, 0.0F, 6, 7, 5, 0.0F);
shardlbb.addBox(-5.0F, 0.0F, 0.0F, 6, 7, 5, 0.0F);
shardrbb = new ModelRenderer(this, 22, 13);
shardrbb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardrbb.addCuboid(3.0F, -2.0F, 0.0F, 2, 8, 5, 0.0F);
shardrbb.addBox(3.0F, -2.0F, 0.0F, 2, 8, 5, 0.0F);
shardlfb = new ModelRenderer(this, 0, 45);
shardlfb.setRotationPoint(0.0F, 16.0F, 0.0F);
shardlfb.addCuboid(-5.0F, 2.0F, -5.0F, 5, 6, 3, 0.0F);
shardlfb.addBox(-5.0F, 2.0F, -5.0F, 5, 6, 3, 0.0F);
}
@Override
@@ -29,18 +29,18 @@ public class ModelTeruTeruBozu extends Model {
textureHeight = 32;
sadFace = new ModelRenderer(this, 32, 0);
sadFace.setRotationPoint(0.0F, 14.5F, 0.0F);
sadFace.addCuboid(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
sadFace.addBox(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
setRotateAngle(sadFace, 0.17453292519943295F, 0.0F, 0.0F);
happyFace = new ModelRenderer(this, 0, 0);
happyFace.setRotationPoint(0.0F, 14.5F, 0.0F);
happyFace.addCuboid(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
happyFace.addBox(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
setRotateAngle(happyFace, -0.17453292519943295F, 0.0F, 0.0F);
thread = new ModelRenderer(this, 32, 16);
thread.setRotationPoint(0.0F, 14.0F, 0.0F);
thread.addCuboid(-3.0F, 2.0F, -3.0F, 6, 1, 6, 0.0F);
thread.addBox(-3.0F, 2.0F, -3.0F, 6, 1, 6, 0.0F);
cloth = new ModelRenderer(this, 0, 16);
cloth.setRotationPoint(0.0F, 21.5F, -1.0F);
cloth.addCuboid(-4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F);
cloth.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F);
setRotateAngle(cloth, 0.7853981633974483F, 2.2689280275926285F, 1.5707963267948966F);
}
@@ -25,9 +25,9 @@ public class ModelArmor extends BipedModel {
// [VanillaCopy] ArmorStandArmorModel.setRotationAngles because armor stands are dumb
// This fixes the armor "breathing" and helmets always facing south on armor stands
@Override
public void setAngles(LivingEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
public void setRotationAngles(LivingEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
if (!(entity instanceof ArmorStandEntity)) {
super.setAngles(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
super.setRotationAngles(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
return;
}
@@ -62,128 +62,128 @@ public class ModelArmorElementium extends ModelArmor {
//helm
this.helmAnchor = new ModelRenderer(this, 0, 0);
this.helmAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helmAnchor.addCuboid(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
this.helmAnchor.addBox(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
this.helm = new ModelRenderer(this, 0, 0);
this.helm.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helm.addCuboid(-4.5F, -9.0F, -4.5F, 9, 9, 9, s);
this.helm.addBox(-4.5F, -9.0F, -4.5F, 9, 9, 9, s);
this.helmFairy = new ModelRenderer(this, 36, 11);
this.helmFairy.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helmFairy.addCuboid(-2.5F, -10.0F, -5.5F, 5, 5, 5, s);
this.helmFairy.addBox(-2.5F, -10.0F, -5.5F, 5, 5, 5, s);
this.helmWing1l = new ModelRenderer(this, 36, 0);
this.helmWing1l.mirror = true;
this.helmWing1l.setRotationPoint(4.5F, -6.0F, -0.5F);
this.helmWing1l.addCuboid(-1.0F, -5.0F, 0.0F, 1, 5, 6, s);
this.helmWing1l.addBox(-1.0F, -5.0F, 0.0F, 1, 5, 6, s);
this.setRotateAngle(helmWing1l, 0.2617993877991494F, 0.5235987755982988F, 0.2617993877991494F);
this.helmWing2l = new ModelRenderer(this, 50, 0);
this.helmWing2l.setRotationPoint(4.5F, -6.0F, -0.5F);
this.helmWing2l.addCuboid(-1.0F, 0.0F, 0.0F, 1, 3, 4, s);
this.helmWing2l.addBox(-1.0F, 0.0F, 0.0F, 1, 3, 4, s);
this.setRotateAngle(helmWing2l, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
this.helmWing1r = new ModelRenderer(this, 36, 0);
this.helmWing1r.setRotationPoint(-4.5F, -6.0F, -0.5F);
this.helmWing1r.addCuboid(0.0F, -5.0F, 0.0F, 1, 5, 6, s);
this.helmWing1r.addBox(0.0F, -5.0F, 0.0F, 1, 5, 6, s);
this.setRotateAngle(helmWing1r, 0.2617993877991494F, -0.5235987755982988F, -0.2617993877991494F);
this.helmWing2r = new ModelRenderer(this, 50, 0);
this.helmWing2r.mirror = true;
this.helmWing2r.setRotationPoint(-4.5F, -6.0F, -0.5F);
this.helmWing2r.addCuboid(0.0F, 0.0F, 0.0F, 1, 3, 4, s);
this.helmWing2r.addBox(0.0F, 0.0F, 0.0F, 1, 3, 4, s);
this.setRotateAngle(helmWing2r, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
//body
this.bodyAnchor = new ModelRenderer(this, 0, 0);
this.bodyAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyAnchor.addCuboid(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.bodyAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.bodyTop = new ModelRenderer(this, 0, 19);
this.bodyTop.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyTop.addCuboid(-4.5F, 0.0F, -3.0F, 9, 6, 6, s);
this.bodyTop.addBox(-4.5F, 0.0F, -3.0F, 9, 6, 6, s);
this.bodyBottom = new ModelRenderer(this, 0, 31);
this.bodyBottom.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyBottom.addCuboid(-3.5F, 5.0F, -2.5F, 7, 3, 5, s);
this.bodyBottom.addBox(-3.5F, 5.0F, -2.5F, 7, 3, 5, s);
//armL
this.armLAnchor = new ModelRenderer(this, 0, 0);
this.armLAnchor.mirror = true;
this.armLAnchor.setRotationPoint(4.0F, 2.0F, 0.0F);
this.armLAnchor.addCuboid(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armLAnchor.addBox(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armL = new ModelRenderer(this, 24, 40);
this.armL.mirror = true;
this.armL.setRotationPoint(0.0F, 0.0F, -0.0F);
this.armL.addCuboid(0.5F, 4.5F, -2.49F, 3, 6, 5, s);
this.armL.addBox(0.5F, 4.5F, -2.49F, 3, 6, 5, s);
this.armLpauldron = new ModelRenderer(this, 0, 40);
this.armLpauldron.mirror = true;
this.armLpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armLpauldron.addCuboid(-0.5F, -3.0F, -3.0F, 6, 7, 6, s);
this.armLpauldron.addBox(-0.5F, -3.0F, -3.0F, 6, 7, 6, s);
this.armLwing1 = new ModelRenderer(this, 40, 35);
this.armLwing1.setRotationPoint(6.0F, -1.0F, 0.0F);
this.armLwing1.addCuboid(0.0F, -4.0F, 0.0F, 0, 4, 5, s);
this.armLwing1.addBox(0.0F, -4.0F, 0.0F, 0, 4, 5, s);
this.setRotateAngle(armLwing1, 0.2617993877991494F, 0.5235987755982988F, 0.2617993877991494F);
this.armLwing2 = new ModelRenderer(this, 40, 40);
this.armLwing2.setRotationPoint(6.0F, -1.0F, 0.0F);
this.armLwing2.addCuboid(0.0F, 0.0F, 0.0F, 0, 3, 4, s);
this.armLwing2.addBox(0.0F, 0.0F, 0.0F, 0, 3, 4, s);
this.setRotateAngle(armLwing2, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
//armR
this.armRAnchor = new ModelRenderer(this, 0, 0);
this.armRAnchor.mirror = true;
this.armRAnchor.setRotationPoint(-4.0F, 2.0F, 0.0F);
this.armRAnchor.addCuboid(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armRAnchor.addBox(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armR = new ModelRenderer(this, 24, 40);
this.armR.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armR.addCuboid(-3.5F, 4.5F, -2.51F, 3, 6, 5, s);
this.armR.addBox(-3.5F, 4.5F, -2.51F, 3, 6, 5, s);
this.armRpauldron = new ModelRenderer(this, 0, 40);
this.armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armRpauldron.addCuboid(-5.5F, -3.0F, -3.0F, 6, 7, 6, s);
this.armRpauldron.addBox(-5.5F, -3.0F, -3.0F, 6, 7, 6, s);
this.setRotateAngle(armRpauldron, 0.0F, 0.0F, 0.0017453292519943296F);
this.armRwing1 = new ModelRenderer(this, 40, 35);
this.armRwing1.mirror = true;
this.armRwing1.setRotationPoint(-6.5F, -1.0F, 0.0F);
this.armRwing1.addCuboid(0.0F, -4.0F, 0.0F, 0, 4, 5, s);
this.armRwing1.addBox(0.0F, -4.0F, 0.0F, 0, 4, 5, s);
this.setRotateAngle(armRwing1, 0.2617993877991494F, -0.5235987755982988F, -0.2617993877991494F);
this.armRwing2 = new ModelRenderer(this, 40, 40);
this.armRwing2.mirror = true;
this.armRwing2.setRotationPoint(-6.5F, -1.0F, 0.0F);
this.armRwing2.addCuboid(0.0F, 0.0F, 0.0F, 0, 3, 4, s);
this.armRwing2.addBox(0.0F, 0.0F, 0.0F, 0, 3, 4, s);
this.setRotateAngle(armRwing2, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
//pants
this.pantsAnchor = new ModelRenderer(this, 0, 0);
this.pantsAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.pantsAnchor.addCuboid(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.pantsAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.belt = new ModelRenderer(this, 0, 53);
this.belt.setRotationPoint(0.0F, 0.0F, 0.0F);
this.belt.addCuboid(-4.5F, 8.0F, -3.0F, 9, 5, 6, s);
this.belt.addBox(-4.5F, 8.0F, -3.0F, 9, 5, 6, s);
this.legL = new ModelRenderer(this, 0, 64);
this.legL.mirror = true;
this.legL.setRotationPoint(1.9F, 12.0F, 0.0F);
this.legL.addCuboid(-2.39F, 0.0F, -2.49F, 5, 6, 5, s);
this.legL.addBox(-2.39F, 0.0F, -2.49F, 5, 6, 5, s);
this.legR = new ModelRenderer(this, 0, 64);
this.legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
this.legR.addCuboid(-2.61F, 0.0F, -2.51F, 5, 6, 5, s);
this.legR.addBox(-2.61F, 0.0F, -2.51F, 5, 6, 5, s);
//boots
this.bootL = new ModelRenderer(this, 0, 75);
this.bootL.mirror = true;
this.bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
this.bootL.addCuboid(-2.39F, 8.5F, -2.49F, 5, 5, 5, s);
this.bootL.addBox(-2.39F, 8.5F, -2.49F, 5, 5, 5, s);
this.bootLwing1 = new ModelRenderer(this, 40, 40);
this.bootLwing1.setRotationPoint(2.5F, 8.5F, 0.0F);
this.bootLwing1.addCuboid(0.0F, -3.0F, 0.0F, 0, 3, 4, s);
this.bootLwing1.addBox(0.0F, -3.0F, 0.0F, 0, 3, 4, s);
this.setRotateAngle(bootLwing1, 0.2617993877991494F, 0.5235987755982988F, 0.2617993877991494F);
this.bootLwing2 = new ModelRenderer(this, 40, 44);
this.bootLwing2.setRotationPoint(2.5F, 8.5F, 0.0F);
this.bootLwing2.addCuboid(0.0F, 0.0F, 0.0F, 0, 2, 3, s);
this.bootLwing2.addBox(0.0F, 0.0F, 0.0F, 0, 2, 3, s);
this.setRotateAngle(bootLwing2, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
this.bootR = new ModelRenderer(this, 0, 75);
this.bootR.setRotationPoint(-1.9F, 12.0F, 0.0F);
this.bootR.addCuboid(-2.61F, 8.5F, -2.51F, 5, 5, 5, s);
this.bootR.addBox(-2.61F, 8.5F, -2.51F, 5, 5, 5, s);
this.bootRwing1 = new ModelRenderer(this, 40, 40);
this.bootRwing1.mirror = true;
this.bootRwing1.setRotationPoint(-2.6F, 8.5F, 0.0F);
this.bootRwing1.addCuboid(0.0F, -3.0F, 0.0F, 0, 3, 4, s);
this.bootRwing1.addBox(0.0F, -3.0F, 0.0F, 0, 3, 4, s);
this.setRotateAngle(bootRwing1, 0.2617993877991494F, -0.5235987755982988F, -0.2617993877991494F);
this.bootRwing2 = new ModelRenderer(this, 40, 44);
this.bootRwing2.mirror = true;
this.bootRwing2.setRotationPoint(-2.5F, 8.5F, 0.0F);
this.bootRwing2.addCuboid(0.0F, 0.0F, 0.0F, 0, 2, 3, s);
this.bootRwing2.addBox(0.0F, 0.0F, 0.0F, 0, 2, 3, s);
this.setRotateAngle(bootRwing2, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
//hierarchy
@@ -54,97 +54,97 @@ public class ModelArmorManasteel extends ModelArmor {
//helm
this.helmAnchor = new ModelRenderer(this, 0, 0);
this.helmAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helmAnchor.addCuboid(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
this.helmAnchor.addBox(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
this.helm = new ModelRenderer(this, 0, 0);
this.helm.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helm.addCuboid(-4.5F, -8.5F, -4.5F, 9, 9, 9, s);
this.helm.addBox(-4.5F, -8.5F, -4.5F, 9, 9, 9, s);
this.helmTop = new ModelRenderer(this, 36, 6);
this.helmTop.setRotationPoint(0.0F, -8.5F, 3.5F);
this.helmTop.addCuboid(-1.5F, 0.0F, -7.0F, 3, 3, 7, s);
this.helmTop.addBox(-1.5F, 0.0F, -7.0F, 3, 3, 7, s);
this.setRotateAngle(helmTop, -0.2617993877991494F, 0.0F, 0.0F);
this.helmCrystal = new ModelRenderer(this, 36, 0);
this.helmCrystal.setRotationPoint(0.0F, -7.5F, -4.5F);
this.helmCrystal.addCuboid(-1.5F, -4.0F, -1.0F, 3, 5, 1, s);
this.helmCrystal.addBox(-1.5F, -4.0F, -1.0F, 3, 5, 1, s);
this.setRotateAngle(helmCrystal, 0.08726646259971647F, 0.0F, 0.0F);
//body
this.bodyAnchor = new ModelRenderer(this, 0, 0);
this.bodyAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyAnchor.addCuboid(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.bodyAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.bodyTop = new ModelRenderer(this, 0, 18);
this.bodyTop.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyTop.addCuboid(-4.5F, -0.5F, -3.0F, 9, 6, 6, s);
this.bodyTop.addBox(-4.5F, -0.5F, -3.0F, 9, 6, 6, s);
this.setRotateAngle(bodyTop, 0.0F, 0.0F, 0.0F);
this.bodyBottom = new ModelRenderer(this, 0, 30);
this.bodyBottom.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyBottom.addCuboid(-2.5F, 5.5F, -2.5F, 5, 3, 5, 0.0F);
this.bodyBottom.addBox(-2.5F, 5.5F, -2.5F, 5, 3, 5, 0.0F);
//armL
this.armLAnchor = new ModelRenderer(this, 0, 0);
this.armLAnchor.mirror = true;
this.armLAnchor.setRotationPoint(4.0F, 2.0F, 0.0F);
this.armLAnchor.addCuboid(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armLAnchor.addBox(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armL = new ModelRenderer(this, 22, 40);
this.armL.mirror = true;
this.armL.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armL.addCuboid(1.5F, 2.0F, -2.49F, 2, 6, 5, s);
this.armL.addBox(1.5F, 2.0F, -2.49F, 2, 6, 5, s);
this.armLpauldron = new ModelRenderer(this, 0, 40);
this.armLpauldron.mirror = true;
this.armLpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armLpauldron.addCuboid(-0.5F, -3.0F, -3.0F, 5, 4, 6, s);
this.armLpauldron.addBox(-0.5F, -3.0F, -3.0F, 5, 4, 6, s);
this.armLcrystal = new ModelRenderer(this, 36, 40);
this.armLcrystal.mirror = true;
this.armLcrystal.setRotationPoint(2.0F, -2.5F, 0.0F);
this.armLcrystal.addCuboid(-0.5F, -2.5F, -1.5F, 2, 3, 3, s);
this.armLcrystal.addBox(-0.5F, -2.5F, -1.5F, 2, 3, 3, s);
this.setRotateAngle(armLcrystal, 0.0F, 0.0F, -0.08726646259971647F);
//armR
this.armRAnchor = new ModelRenderer(this, 0, 0);
this.armRAnchor.mirror = true;
this.armRAnchor.setRotationPoint(-4.0F, 2.0F, 0.0F);
this.armRAnchor.addCuboid(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armRAnchor.addBox(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armR = new ModelRenderer(this, 22, 40);
this.armR.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armR.addCuboid(-3.5F, 2.0F, -2.51F, 2, 6, 5, s);
this.armR.addBox(-3.5F, 2.0F, -2.51F, 2, 6, 5, s);
this.armRpauldron = new ModelRenderer(this, 0, 40);
this.armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armRpauldron.addCuboid(-4.5F, -3.0F, -3.0F, 5, 4, 6, s);
this.armRpauldron.addBox(-4.5F, -3.0F, -3.0F, 5, 4, 6, s);
this.armRcrystal = new ModelRenderer(this, 36, 40);
this.armRcrystal.setRotationPoint(-2.0F, -2.5F, 0.0F);
this.armRcrystal.addCuboid(-1.5F, -2.5F, -1.5F, 2, 3, 3, s);
this.armRcrystal.addBox(-1.5F, -2.5F, -1.5F, 2, 3, 3, s);
this.setRotateAngle(armRcrystal, 0.0F, 0.0F, 0.08726646259971647F);
//pants
this.pantsAnchor = new ModelRenderer(this, 0, 0);
this.pantsAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.pantsAnchor.addCuboid(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.pantsAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.belt = new ModelRenderer(this, 0, 51);
this.belt.setRotationPoint(0.0F, 0.0F, 0.0F);
this.belt.addCuboid(-4.5F, 9.0F, -3.0F, 9, 3, 6, s);
this.belt.addBox(-4.5F, 9.0F, -3.0F, 9, 3, 6, s);
this.legL = new ModelRenderer(this, 0, 60);
this.legL.mirror = true;
this.legL.setRotationPoint(1.9F, 12.0F, 0.0F);
this.legL.addCuboid(-0.39F, 0.0F, -2.49F, 3, 6, 5, s);
this.legL.addBox(-0.39F, 0.0F, -2.49F, 3, 6, 5, s);
this.legR = new ModelRenderer(this, 0, 60);
this.legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
this.legR.addCuboid(-2.61F, 0.0F, -2.51F, 3, 6, 5, s);
this.legR.addBox(-2.61F, 0.0F, -2.51F, 3, 6, 5, s);
//boots
this.bootL = new ModelRenderer(this, 0, 71);
this.bootL.mirror = true;
this.bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
this.bootL.addCuboid(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
this.bootL.addBox(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
this.bootLcrystal = new ModelRenderer(this, 36, 46);
this.bootLcrystal.mirror = true;
this.bootLcrystal.setRotationPoint(2.5F, 9.0F, 2.0F);
this.bootLcrystal.addCuboid(-1.0F, -2.0F, -1.5F, 2, 3, 3, s);
this.bootLcrystal.addBox(-1.0F, -2.0F, -1.5F, 2, 3, 3, s);
this.setRotateAngle(bootLcrystal, 0.0F, 0.0F, 0.08726646259971647F);
this.bootR = new ModelRenderer(this, 0, 71);
this.bootR.setRotationPoint(-2.0F, 12.0F, 0.0F);
this.bootR.addCuboid(-2.5F, 8.5F, -2.51F, 5, 4, 5, s);
this.bootR.addBox(-2.5F, 8.5F, -2.51F, 5, 4, 5, s);
this.bootRcrystal = new ModelRenderer(this, 36, 46);
this.bootRcrystal.setRotationPoint(-2.5F, 9.0F, 2.0F);
this.bootRcrystal.addCuboid(-1.0F, -2.0F, -1.5F, 2, 3, 3, s);
this.bootRcrystal.addBox(-1.0F, -2.0F, -1.5F, 2, 3, 3, s);
this.setRotateAngle(bootRcrystal, 0.0F, 0.0F, -0.08726646259971647F);
//hierarchy
@@ -49,82 +49,82 @@ public class ModelArmorManaweave extends ModelArmor {
//helm
this.helmAnchor = new ModelRenderer(this, 0, 0);
this.helmAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helmAnchor.addCuboid(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
this.helmAnchor.addBox(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
this.helm = new ModelRenderer(this, 0, 0);
this.helm.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helm.addCuboid(-4.5F, -9.5F, -4.0F, 9, 11, 10, s);
this.helm.addBox(-4.5F, -9.5F, -4.0F, 9, 11, 10, s);
this.setRotateAngle(helm, 0.17453292519943295F, 0.0F, 0.0F);
//body
this.bodyAnchor = new ModelRenderer(this, 0, 0);
this.bodyAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyAnchor.addCuboid(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.bodyAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.bodyTop = new ModelRenderer(this, 0, 21);
this.bodyTop.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyTop.addCuboid(-4.5F, -0.5F, -3.0F, 9, 7, 6, s);
this.bodyTop.addBox(-4.5F, -0.5F, -3.0F, 9, 7, 6, s);
this.setRotateAngle(bodyTop, 0.0F, 0.0F, 0.0F);
this.bodyBottom = new ModelRenderer(this, 0, 34);
this.bodyBottom.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyBottom.addCuboid(-4.5F, 6.5F, -2.5F, 9, 5, 5, s);
this.bodyBottom.addBox(-4.5F, 6.5F, -2.5F, 9, 5, 5, s);
this.setRotateAngle(bodyBottom, -0F, 0.0F, 0.0F);
//armL
this.armLAnchor = new ModelRenderer(this, 0, 0);
this.armLAnchor.mirror = true;
this.armLAnchor.setRotationPoint(4.0F, 2.0F, 0.0F);
this.armLAnchor.addCuboid(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armLAnchor.addBox(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armL = new ModelRenderer(this, 0, 44);
this.armL.mirror = true;
this.armL.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armL.addCuboid(-1.5F, -2.5F, -2.49F, 5, 10, 5, s);
this.armL.addBox(-1.5F, -2.5F, -2.49F, 5, 10, 5, s);
this.armLpauldron = new ModelRenderer(this, 20, 44);
this.armLpauldron.mirror = true;
this.armLpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armLpauldron.addCuboid(-1.0F, -3.0F, -3.0F, 6, 5, 6, s);
this.armLpauldron.addBox(-1.0F, -3.0F, -3.0F, 6, 5, 6, s);
this.setRotateAngle(armLpauldron, 0.0F, 0.0F, -0.08726646259971647F);
//armR
this.armRAnchor = new ModelRenderer(this, 0, 0);
this.armRAnchor.mirror = true;
this.armRAnchor.setRotationPoint(-4.0F, 2.0F, 0.0F);
this.armRAnchor.addCuboid(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armRAnchor.addBox(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armR = new ModelRenderer(this, 0, 44);
this.armR.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armR.addCuboid(-3.5F, -2.5F, -2.51F, 5, 10, 5, s);
this.armR.addBox(-3.5F, -2.5F, -2.51F, 5, 10, 5, s);
this.armRpauldron = new ModelRenderer(this, 20, 44);
this.armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armRpauldron.addCuboid(-5.0F, -3.0F, -3.0F, 6, 5, 6, s);
this.armRpauldron.addBox(-5.0F, -3.0F, -3.0F, 6, 5, 6, s);
this.setRotateAngle(armRpauldron, 0.0F, 0.0F, 0.08726646259971647F);
//pants
this.pantsAnchor = new ModelRenderer(this, 0, 0);
this.pantsAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.pantsAnchor.addCuboid(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.pantsAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.legL = new ModelRenderer(this, 0, 78);
this.legL.mirror = true;
this.legL.setRotationPoint(1.9F, 12.0F, 0.0F);
this.legL.addCuboid(-2.39F, -0.5F, -2.49F, 5, 6, 5, s);
this.legL.addBox(-2.39F, -0.5F, -2.49F, 5, 6, 5, s);
this.skirtL = new ModelRenderer(this, 0, 59);
this.skirtL.mirror = true;
this.skirtL.setRotationPoint(-0.5F, -2.0F, -2.5F);
this.skirtL.addCuboid(-1.0F, 0.0F, -0.5F, 5, 13, 6, s);
this.skirtL.addBox(-1.0F, 0.0F, -0.5F, 5, 13, 6, s);
this.setRotateAngle(skirtL, 0.0F, -0.17453292519943295F, -0.2617993877991494F);
this.legR = new ModelRenderer(this, 0, 78);
this.legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
this.legR.addCuboid(-2.61F, 0.0F, -2.51F, 5, 6, 5, s);
this.legR.addBox(-2.61F, 0.0F, -2.51F, 5, 6, 5, s);
this.skirtR = new ModelRenderer(this, 0, 59);
this.skirtR.setRotationPoint(0.5F, -2.0F, -2.5F);
this.skirtR.addCuboid(-4.0F, 0.0F, -0.5F, 5, 13, 6, s);
this.skirtR.addBox(-4.0F, 0.0F, -0.5F, 5, 13, 6, s);
this.setRotateAngle(skirtR, 0.0F, 0.17453292519943295F, 0.2617993877991494F);
//boot
this.bootL = new ModelRenderer(this, 0, 89);
this.bootL.mirror = true;
this.bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
this.bootL.addCuboid(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
this.bootL.addBox(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
this.bootR = new ModelRenderer(this, 0, 89);
this.bootR.setRotationPoint(-1.9F, 12.0F, 0.0F);
this.bootR.addCuboid(-2.61F, 8.5F, -2.51F, 5, 4, 5, s);
this.bootR.addBox(-2.61F, 8.5F, -2.51F, 5, 4, 5, s);
//hierarchy
this.helmAnchor.addChild(this.helm);
@@ -71,161 +71,161 @@ public class ModelArmorTerrasteel extends ModelArmor {
//helm
this.helmAnchor = new ModelRenderer(this, 0, 0);
this.helmAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helmAnchor.addCuboid(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
this.helmAnchor.addBox(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
this.helm = new ModelRenderer(this, 0, 0);
this.helm.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helm.addCuboid(-4.5F, -9.0F, -4.5F, 9, 11, 9, s);
this.helm.addBox(-4.5F, -9.0F, -4.5F, 9, 11, 9, s);
this.helmFront = new ModelRenderer(this, 36, 0);
this.helmFront.setRotationPoint(0.0F, 0.0F, 0.0F);
this.helmFront.addCuboid(-1.5F, -10.0F, -5.5F, 3, 8, 7, s);
this.helmFront.addBox(-1.5F, -10.0F, -5.5F, 3, 8, 7, s);
this.helmLeaf1l = new ModelRenderer(this, 56, 14);
this.helmLeaf1l.mirror = true;
this.helmLeaf1l.setRotationPoint(4.5F, -6.0F, -2.5F);
this.helmLeaf1l.addCuboid(0.0F, -3.0F, -1.0F, 2, 3, 1, s);
this.helmLeaf1l.addBox(0.0F, -3.0F, -1.0F, 2, 3, 1, s);
this.setRotateAngle(helmLeaf1l, -0.2617993877991494F, -0.2617993877991494F, 0.5235987755982988F);
this.helmLeaf2l = new ModelRenderer(this, 56, 8);
this.helmLeaf2l.mirror = true;
this.helmLeaf2l.setRotationPoint(4.5F, -6.0F, -0.5F);
this.helmLeaf2l.addCuboid(0.0F, -5.0F, -1.0F, 2, 5, 1, s);
this.helmLeaf2l.addBox(0.0F, -5.0F, -1.0F, 2, 5, 1, s);
this.setRotateAngle(helmLeaf2l, -0.5235987755982988F, -0.5235987755982988F, 0.7853981633974483F);
this.helmLeaf3l = new ModelRenderer(this, 56, 0);
this.helmLeaf3l.mirror = true;
this.helmLeaf3l.setRotationPoint(4.5F, -6.0F, 2.5F);
this.helmLeaf3l.addCuboid(0.0F, -7.0F, -1.0F, 2, 7, 1, s);
this.helmLeaf3l.addBox(0.0F, -7.0F, -1.0F, 2, 7, 1, s);
this.setRotateAngle(helmLeaf3l, -0.7853981633974483F, -0.7853981633974483F, 0.7853981633974483F);
this.helmLeaf1r = new ModelRenderer(this, 56, 14);
this.helmLeaf1r.setRotationPoint(-4.5F, -6.0F, -2.5F);
this.helmLeaf1r.addCuboid(-2.0F, -3.0F, -1.0F, 2, 3, 1, s);
this.helmLeaf1r.addBox(-2.0F, -3.0F, -1.0F, 2, 3, 1, s);
this.setRotateAngle(helmLeaf1r, -0.2617993877991494F, 0.2617993877991494F, -0.5235987755982988F);
this.helmLeaf2r = new ModelRenderer(this, 56, 8);
this.helmLeaf2r.setRotationPoint(-4.5F, -6.0F, -0.5F);
this.helmLeaf2r.addCuboid(-2.0F, -5.0F, -1.0F, 2, 5, 1, s);
this.helmLeaf2r.addBox(-2.0F, -5.0F, -1.0F, 2, 5, 1, s);
this.setRotateAngle(helmLeaf2r, -0.5235987755982988F, 0.5235987755982988F, -0.7853981633974483F);
this.helmLeaf3r = new ModelRenderer(this, 56, 0);
this.helmLeaf3r.setRotationPoint(-4.5F, -6.0F, 2.5F);
this.helmLeaf3r.addCuboid(-2.0F, -7.0F, -1.0F, 2, 7, 1, s);
this.helmLeaf3r.addBox(-2.0F, -7.0F, -1.0F, 2, 7, 1, s);
this.setRotateAngle(helmLeaf3r, -0.7853981633974483F, 0.7853981633974483F, -0.7853981633974483F);
this.helmbranch1l = new ModelRenderer(this, 36, 15);
this.helmbranch1l.mirror = true;
this.helmbranch1l.setRotationPoint(2.5F, -9.0F, -3.5F);
this.helmbranch1l.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.helmbranch1l.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.setRotateAngle(helmbranch1l, 0.5235987755982988F, 0.2617993877991494F, 0.0F);
this.helmbranch2l = new ModelRenderer(this, 36, 15);
this.helmbranch2l.mirror = true;
this.helmbranch2l.setRotationPoint(4.5F, -3.0F, -2.5F);
this.helmbranch2l.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.helmbranch2l.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.setRotateAngle(helmbranch2l, 0.08726646259971647F, 0.2617993877991494F, 0.0F);
this.helmbranch1r = new ModelRenderer(this, 36, 15);
this.helmbranch1r.setRotationPoint(-2.5F, -9.0F, -3.5F);
this.helmbranch1r.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.helmbranch1r.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.setRotateAngle(helmbranch1r, 0.5235987755982988F, -0.2617993877991494F, 0.0F);
this.helmbranch2r = new ModelRenderer(this, 36, 15);
this.helmbranch2r.setRotationPoint(-4.5F, -3.0F, -2.5F);
this.helmbranch2r.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.helmbranch2r.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.setRotateAngle(helmbranch2r, 0.08726646259971647F, -0.2617993877991494F, 0.0F);
//body
this.bodyAnchor = new ModelRenderer(this, 0, 0);
this.bodyAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyAnchor.addCuboid(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.bodyAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.bodyTop = new ModelRenderer(this, 0, 20);
this.bodyTop.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyTop.addCuboid(-5.5F, 0.0F, -3.0F, 11, 6, 6, s);
this.bodyTop.addBox(-5.5F, 0.0F, -3.0F, 11, 6, 6, s);
this.bodyBottom = new ModelRenderer(this, 0, 32);
this.bodyBottom.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bodyBottom.addCuboid(-4.5F, 5.0F, -2.5F, 9, 3, 5, s);
this.bodyBottom.addBox(-4.5F, 5.0F, -2.5F, 9, 3, 5, s);
//armL
this.armLAnchor = new ModelRenderer(this, 0, 0);
this.armLAnchor.mirror = true;
this.armLAnchor.setRotationPoint(4.0F, 2.0F, 0.0F);
this.armLAnchor.addCuboid(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armLAnchor.addBox(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armL = new ModelRenderer(this, 0, 52);
this.armL.mirror = true;
this.armL.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armL.addCuboid(-1.5F, 3.0F, -2.49F, 5, 8, 5, s);
this.armL.addBox(-1.5F, 3.0F, -2.49F, 5, 8, 5, s);
this.armLpauldron = new ModelRenderer(this, 0, 40);
this.armLpauldron.mirror = true;
this.armLpauldron.setRotationPoint(1.5F, 0.0F, 0.0F);
this.armLpauldron.addCuboid(-1.0F, -3.0F, -3.0F, 6, 6, 6, s);
this.armLpauldron.addBox(-1.0F, -3.0F, -3.0F, 6, 6, 6, s);
this.armLbranch1 = new ModelRenderer(this, 36, 15);
this.armLbranch1.mirror = true;
this.armLbranch1.setRotationPoint(4.0F, -3.0F, -1.0F);
this.armLbranch1.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.armLbranch1.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.setRotateAngle(armLbranch1, 0.5235987755982988F, 0.5235987755982988F, 0.0F);
this.armLbranch2 = new ModelRenderer(this, 36, 24);
this.armLbranch2.mirror = true;
this.armLbranch2.setRotationPoint(5.0F, -2.0F, 0.0F);
this.armLbranch2.addCuboid(-1.0F, 0.0F, 0.0F, 2, 2, 5, s);
this.armLbranch2.addBox(-1.0F, 0.0F, 0.0F, 2, 2, 5, s);
this.setRotateAngle(armLbranch2, 0.08726646259971647F, 0.7853981633974483F, 0.0F);
//armR
this.armRAnchor = new ModelRenderer(this, 0, 0);
this.armRAnchor.mirror = true;
this.armRAnchor.setRotationPoint(-4.0F, 2.0F, 0.0F);
this.armRAnchor.addCuboid(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armRAnchor.addBox(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
this.armR = new ModelRenderer(this, 0, 52);
this.armR.setRotationPoint(0.0F, 0.0F, 0.0F);
this.armR.addCuboid(-3.5F, 3.0F, -2.51F, 5, 8, 5, s);
this.armR.addBox(-3.5F, 3.0F, -2.51F, 5, 8, 5, s);
this.armRpauldron = new ModelRenderer(this, 0, 40);
this.armRpauldron.setRotationPoint(-1.5F, 0.0F, 0.0F);
this.armRpauldron.addCuboid(-5.0F, -3.0F, -3.0F, 6, 6, 6, s);
this.armRpauldron.addBox(-5.0F, -3.0F, -3.0F, 6, 6, 6, s);
this.armRbranch1 = new ModelRenderer(this, 36, 15);
this.armRbranch1.setRotationPoint(-4.0F, -3.0F, -1.0F);
this.armRbranch1.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.armRbranch1.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.setRotateAngle(armRbranch1, 0.5235987755982988F, -0.5235987755982988F, 0.0F);
this.armRbranch2 = new ModelRenderer(this, 36, 24);
this.armRbranch2.setRotationPoint(-5.0F, -2.0F, 0.0F);
this.armRbranch2.addCuboid(-1.0F, 0.0F, 0.0F, 2, 2, 5, s);
this.armRbranch2.addBox(-1.0F, 0.0F, 0.0F, 2, 2, 5, s);
this.setRotateAngle(armRbranch2, 0.08726646259971647F, -0.7853981633974483F, 0.0F);
//pants
this.pantsAnchor = new ModelRenderer(this, 0, 0);
this.pantsAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.pantsAnchor.addCuboid(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.pantsAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
this.belt = new ModelRenderer(this, 0, 65);
this.belt.setRotationPoint(0.0F, 0.0F, 0.0F);
this.belt.addCuboid(-4.5F, 8.0F, -3.0F, 9, 5, 6, s);
this.belt.addBox(-4.5F, 8.0F, -3.0F, 9, 5, 6, s);
this.legL = new ModelRenderer(this, 0, 76);
this.legL.mirror = true;
this.legL.setRotationPoint(1.9F, 12.0F, 0.0F);
this.legL.addCuboid(-2.39F, -0.01F, -2.49F, 5, 6, 5, s);
this.legL.addBox(-2.39F, -0.01F, -2.49F, 5, 6, 5, s);
this.legR = new ModelRenderer(this, 0, 76);
this.legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
this.legR.addCuboid(-2.61F, -0.01F, -2.51F, 5, 6, 5, s);
this.legR.addBox(-2.61F, -0.01F, -2.51F, 5, 6, 5, s);
//boots
this.bootL = new ModelRenderer(this, 0, 94);
this.bootL.mirror = true;
this.bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
this.bootL.addCuboid(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
this.bootL.addBox(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
this.bootLtop = new ModelRenderer(this, 0, 87);
this.bootLtop.mirror = true;
this.bootLtop.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bootLtop.addCuboid(-2.39F, 6.0F, -2.49F, 6, 2, 5, s);
this.bootLtop.addBox(-2.39F, 6.0F, -2.49F, 6, 2, 5, s);
this.bootLbranch1 = new ModelRenderer(this, 36, 15);
this.bootLbranch1.mirror = true;
this.bootLbranch1.setRotationPoint(3.5F, 6.0F, 0.0F);
this.bootLbranch1.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.bootLbranch1.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.setRotateAngle(bootLbranch1, 0.2617993877991494F, 0.2617993877991494F, -0.08726646259971647F);
this.bootLbranch2 = new ModelRenderer(this, 36, 24);
this.bootLbranch2.mirror = true;
this.bootLbranch2.setRotationPoint(2.5F, 9.0F, 0.0F);
this.bootLbranch2.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 5, s);
this.bootLbranch2.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 5, s);
this.setRotateAngle(bootLbranch2, 0.08726646259971647F, 0.7853981633974483F, 0.0F);
this.bootR = new ModelRenderer(this, 0, 94);
this.bootR.setRotationPoint(-1.9F, 12.0F, 0.0F);
this.bootR.addCuboid(-2.61F, 8.5F, -2.51F, 5, 4, 5, s);
this.bootR.addBox(-2.61F, 8.5F, -2.51F, 5, 4, 5, s);
this.bootRtop = new ModelRenderer(this, 0, 87);
this.bootRtop.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bootRtop.addCuboid(-3.61F, 6.0F, -2.51F, 6, 2, 5, s);
this.bootRtop.addBox(-3.61F, 6.0F, -2.51F, 6, 2, 5, s);
this.bootRbranch1 = new ModelRenderer(this, 36, 15);
this.bootRbranch1.setRotationPoint(-3.5F, 6.0F, 0.0F);
this.bootRbranch1.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.bootRbranch1.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
this.setRotateAngle(bootRbranch1, 0.2617993877991494F, -0.2617993877991494F, 0.08726646259971647F);
this.bootRbranch2 = new ModelRenderer(this, 36, 24);
this.bootRbranch2.setRotationPoint(-2.5F, 9.0F, 0.5F);
this.bootRbranch2.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 5, s);
this.bootRbranch2.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 5, s);
this.setRotateAngle(bootRbranch2, 0.08726646259971647F, -0.7853981633974483F, 0.0F);
//hierarchy
@@ -40,7 +40,7 @@ public class RenderBabylonWeapon extends EntityRenderer<EntityBabylonWeapon> {
@Override
public void render(@Nonnull EntityBabylonWeapon weapon, float yaw, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers, int light) {
ms.push();
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(weapon.getRotation()));
ms.rotate(Vector3f.YP.rotationDegrees(weapon.getRotation()));
int live = weapon.getLiveTicks();
int delay = weapon.getDelay();
@@ -50,18 +50,18 @@ public class RenderBabylonWeapon extends EntityRenderer<EntityBabylonWeapon> {
ms.push();
float s = 1.5F;
ms.scale(s, s, s);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-90F));
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(45F));
ms.rotate(Vector3f.YP.rotationDegrees(-90F));
ms.rotate(Vector3f.ZP.rotationDegrees(45F));
// todo 1.15 get the alpha in to the BMR
// GlStateManager.color4f(1F, 1F, 1F, chargeMul);
IBakedModel model = MiscellaneousIcons.INSTANCE.kingKeyWeaponModels[weapon.getVariety()];
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffers.getBuffer(Atlases.getEntityTranslucent()), null, model, 1, 1, 1, 0xF000F0, OverlayTexture.DEFAULT_UV);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffers.getBuffer(Atlases.getTranslucentBlockType()), null, model, 1, 1, 1, 0xF000F0, OverlayTexture.NO_OVERLAY);
ms.pop();
Random rand = new Random(weapon.getUniqueID().getMostSignificantBits());
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(-90F));
ms.rotate(Vector3f.XP.rotationDegrees(-90F));
ms.translate(0F, -0.3F + rand.nextFloat() * 0.1F, 1F);
s = chargeMul;
@@ -71,14 +71,14 @@ public class RenderBabylonWeapon extends EntityRenderer<EntityBabylonWeapon> {
s *= 2F;
ms.scale(s, s, s);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(charge * 9F + (weapon.ticksExisted + partialTicks) * 0.5F + rand.nextFloat() * 360F));
ms.rotate(Vector3f.YP.rotationDegrees(charge * 9F + (weapon.ticksExisted + partialTicks) * 0.5F + rand.nextFloat() * 360F));
IVertexBuilder buffer = buffers.getBuffer(RenderHelper.BABYLON_ICON);
Matrix4f mat = ms.peek().getModel();
buffer.vertex(mat, -1, 0, -1).color(1, 1, 1, chargeMul).texture(0, 0).endVertex();
buffer.vertex(mat, -1, 0, 1).color(1, 1, 1, chargeMul).texture(0, 1).endVertex();
buffer.vertex(mat, 1, 0, 1).color(1, 1, 1, chargeMul).texture(1, 1).endVertex();
buffer.vertex(mat, 1, 0, -1).color(1, 1, 1, chargeMul).texture(1, 0).endVertex();
Matrix4f mat = ms.getLast().getMatrix();
buffer.pos(mat, -1, 0, -1).color(1, 1, 1, chargeMul).tex(0, 0).endVertex();
buffer.pos(mat, -1, 0, 1).color(1, 1, 1, chargeMul).tex(0, 1).endVertex();
buffer.pos(mat, 1, 0, 1).color(1, 1, 1, chargeMul).tex(1, 1).endVertex();
buffer.pos(mat, 1, 0, -1).color(1, 1, 1, chargeMul).tex(1, 0).endVertex();
ms.pop();
}
@@ -46,7 +46,7 @@ public class RenderCorporeaSpark extends RenderSparkBase<EntityCorporeaSpark> {
}
ms.push();
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
ms.rotate(Vector3f.XP.rotationDegrees(90));
float scalef = 1F / 6F;
ms.scale(scalef, scalef, scalef);
//todo 1.15 GlStateManager.color4f(1F, 1F, 1F, absTime / 10);
@@ -41,13 +41,13 @@ public class RenderDoppleganger extends BipedRenderer<EntityDoppleganger, BipedM
int disfigurationUniform = GlStateManager.getUniformLocation(shader, "disfiguration");
ShaderHelper.FLOAT_BUF.position(0);
ShaderHelper.FLOAT_BUF.put(0, disfiguration);
GlStateManager.uniform1(disfigurationUniform, ShaderHelper.FLOAT_BUF);
GlStateManager.uniform1f(disfigurationUniform, ShaderHelper.FLOAT_BUF);
// Vert Uniforms
int grainIntensityUniform = GlStateManager.getUniformLocation(shader, "grainIntensity");
ShaderHelper.FLOAT_BUF.position(0);
ShaderHelper.FLOAT_BUF.put(0, grainIntensity);
GlStateManager.uniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
GlStateManager.uniform1f(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
};
public static final ShaderCallback defaultCallback = shader -> {
@@ -55,13 +55,13 @@ public class RenderDoppleganger extends BipedRenderer<EntityDoppleganger, BipedM
int disfigurationUniform = GlStateManager.getUniformLocation(shader, "disfiguration");
ShaderHelper.FLOAT_BUF.position(0);
ShaderHelper.FLOAT_BUF.put(0, DEFAULT_DISFIGURATION);
GlStateManager.uniform1(disfigurationUniform, ShaderHelper.FLOAT_BUF);
GlStateManager.uniform1f(disfigurationUniform, ShaderHelper.FLOAT_BUF);
// Vert Uniforms
int grainIntensityUniform = GlStateManager.getUniformLocation(shader, "grainIntensity");
ShaderHelper.FLOAT_BUF.position(0);
ShaderHelper.FLOAT_BUF.put(0, DEFAULT_GRAIN_INTENSITY);
GlStateManager.uniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
GlStateManager.uniform1f(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
};
public RenderDoppleganger(EntityRendererManager renderManager) {
@@ -95,7 +95,7 @@ public class RenderDoppleganger extends BipedRenderer<EntityDoppleganger, BipedM
}
@Override
protected boolean func_225622_a_(EntityDoppleganger dopple) {
protected boolean isVisible(EntityDoppleganger dopple) {
return true;
}
@@ -29,13 +29,13 @@ public class RenderPixie extends MobRenderer<EntityPixie, ModelPixie> {
int disfigurationUniform = GlStateManager.getUniformLocation(shader, "disfiguration");
ShaderHelper.FLOAT_BUF.position(0);
ShaderHelper.FLOAT_BUF.put(0, 0.025F);
GlStateManager.uniform1(disfigurationUniform, ShaderHelper.FLOAT_BUF);
GlStateManager.uniform1f(disfigurationUniform, ShaderHelper.FLOAT_BUF);
// Vert Uniforms
int grainIntensityUniform = GlStateManager.getUniformLocation(shader, "grainIntensity");
ShaderHelper.FLOAT_BUF.position(0);
ShaderHelper.FLOAT_BUF.put(0, 0.05F);
GlStateManager.uniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
GlStateManager.uniform1f(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
};
public RenderPixie(EntityRendererManager renderManager) {
@@ -32,10 +32,10 @@ public class RenderPoolMinecart extends MinecartRenderer<EntityPoolMinecart> {
}
@Override
protected void renderBlock(EntityPoolMinecart poolCart, float partialTicks, @Nonnull BlockState state, MatrixStack ms, IRenderTypeBuffer buffers, int light) {
super.renderBlock(poolCart, partialTicks, state, ms, buffers, light);
protected void renderBlockState(EntityPoolMinecart poolCart, float partialTicks, @Nonnull BlockState state, MatrixStack ms, IRenderTypeBuffer buffers, int light) {
super.renderBlockState(poolCart, partialTicks, state, ms, buffers, light);
RenderTilePool.cartMana = poolCart.getMana();
TileEntityRendererDispatcher.instance.getRenderer(DUMMY).render(null, ClientTickHandler.partialTicks, ms, buffers, light, OverlayTexture.DEFAULT_UV);
TileEntityRendererDispatcher.instance.getRenderer(DUMMY).render(null, ClientTickHandler.partialTicks, ms, buffers, light, OverlayTexture.NO_OVERLAY);
}
}
@@ -53,8 +53,8 @@ public abstract class RenderSparkBase<T extends EntitySparkBase> extends EntityR
IVertexBuilder buffer = buffers.getBuffer(RenderHelper.SPARK);
ms.push();
ms.multiply(renderManager.getRotation());
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180));
ms.rotate(renderManager.getCameraOrientation());
ms.rotate(Vector3f.YP.rotationDegrees(180));
renderIcon(ms, buffer, iicon, iconColor);
ms.push();
@@ -107,11 +107,11 @@ public abstract class RenderSparkBase<T extends EntitySparkBase> extends EntityR
int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = color & 0xFF;
Matrix4f mat = ms.peek().getModel();
buffer.vertex(mat, 0.0F - f5, 0.0F - f6, 0.0F).color(r, g, b, a).texture(f, f3).light(fullbright).endVertex();
buffer.vertex(mat, f4 - f5, 0.0F - f6, 0.0F).color(r, g, b, a).texture(f1, f3).light(fullbright).endVertex();
buffer.vertex(mat, f4 - f5, f4 - f6, 0.0F).color(r, g, b, a).texture(f1, f2).light(fullbright).endVertex();
buffer.vertex(mat, 0.0F - f5, f4 - f6, 0.0F).color(r, g, b, a).texture(f, f2).light(fullbright).endVertex();
Matrix4f mat = ms.getLast().getMatrix();
buffer.pos(mat, 0.0F - f5, 0.0F - f6, 0.0F).color(r, g, b, a).tex(f, f3).lightmap(fullbright).endVertex();
buffer.pos(mat, f4 - f5, 0.0F - f6, 0.0F).color(r, g, b, a).tex(f1, f3).lightmap(fullbright).endVertex();
buffer.pos(mat, f4 - f5, f4 - f6, 0.0F).color(r, g, b, a).tex(f1, f2).lightmap(fullbright).endVertex();
buffer.pos(mat, 0.0F - f5, f4 - f6, 0.0F).color(r, g, b, a).tex(f, f2).lightmap(fullbright).endVertex();
}
}
@@ -48,7 +48,7 @@ public class RenderTileAlfPortal extends TileEntityRenderer<TileAlfPortal> {
if (state == AlfPortalState.ON_X) {
ms.translate(1.25F, 0F, 1.75F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90F));
ms.rotate(Vector3f.YP.rotationDegrees(90F));
}
renderIcon(ms, buffers, MiscellaneousIcons.INSTANCE.alfPortalTex, 0, 0, 3, 3, alpha, overlay);
@@ -59,13 +59,13 @@ public class RenderTileAlfPortal extends TileEntityRenderer<TileAlfPortal> {
}
public void renderIcon(MatrixStack ms, IRenderTypeBuffer buffers, TextureAtlasSprite icon, int x, int y, int width, int height, float alpha, int overlay) {
IVertexBuilder buffer = buffers.getBuffer(Atlases.getEntityTranslucent());
Matrix4f model = ms.peek().getModel();
Matrix3f normal = ms.peek().getNormal();
buffer.vertex(model, x, y + height, 0).color(1, 1, 1, alpha).texture(icon.getMinU(), icon.getMaxV()).overlay(overlay).light(0xF000F0).normal(normal, 1, 0, 0).endVertex();
buffer.vertex(model, x + width, y + height, 0).color(1, 1, 1, alpha).texture(icon.getMaxU(), icon.getMaxV()).overlay(overlay).light(0xF000F0).normal(normal, 1, 0, 0).endVertex();
buffer.vertex(model, x + width, y, 0).color(1, 1, 1, alpha).texture(icon.getMaxU(), icon.getMinV()).overlay(overlay).light(0xF000F0).normal(normal, 1, 0, 0).endVertex();
buffer.vertex(model, x, y, 0).color(1, 1, 1, alpha).texture(icon.getMinU(), icon.getMinV()).overlay(overlay).light(0xF000F0).normal(normal, 1, 0, 0).endVertex();
IVertexBuilder buffer = buffers.getBuffer(Atlases.getTranslucentBlockType());
Matrix4f model = ms.getLast().getMatrix();
Matrix3f normal = ms.getLast().getNormal();
buffer.pos(model, x, y + height, 0).color(1, 1, 1, alpha).tex(icon.getMinU(), icon.getMaxV()).overlay(overlay).lightmap(0xF000F0).normal(normal, 1, 0, 0).endVertex();
buffer.pos(model, x + width, y + height, 0).color(1, 1, 1, alpha).tex(icon.getMaxU(), icon.getMaxV()).overlay(overlay).lightmap(0xF000F0).normal(normal, 1, 0, 0).endVertex();
buffer.pos(model, x + width, y, 0).color(1, 1, 1, alpha).tex(icon.getMaxU(), icon.getMinV()).overlay(overlay).lightmap(0xF000F0).normal(normal, 1, 0, 0).endVertex();
buffer.pos(model, x, y, 0).color(1, 1, 1, alpha).tex(icon.getMinU(), icon.getMinV()).overlay(overlay).lightmap(0xF000F0).normal(normal, 1, 0, 0).endVertex();
}
}
@@ -92,7 +92,7 @@ public class RenderTileAltar extends TileEntityRenderer<TileAltar> {
v /= 2F;
ms.translate(v, v, v);
ms.multiply(new Vector3f(xRotate, yRotate, zRotate).getDegreesQuaternion(deg));
ms.rotate(new Vector3f(xRotate, yRotate, zRotate).rotationDegrees(deg));
ms.translate(-v, -v, -v);
v *= 2F;
@@ -108,14 +108,14 @@ public class RenderTileAltar extends TileEntityRenderer<TileAltar> {
float alpha = lava ? 1F : 0.7F;
ms.translate(w, -0.3F, w);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
ms.rotate(Vector3f.XP.rotationDegrees(90));
ms.scale(s, s, s);
TextureAtlasSprite sprite = lava ? Minecraft.getInstance().getModelManager().getBlockModelShapes().getModel(Blocks.LAVA.getDefaultState()).getParticleTexture()
: Minecraft.getInstance().getModelManager().getBlockModelShapes().getModel(Blocks.WATER.getDefaultState()).getParticleTexture();
int color = lava ? Fluids.LAVA.getAttributes().getColor(altar.getWorld(), altar.getPos())
: Fluids.WATER.getAttributes().getColor(altar.getWorld(), altar.getPos());
IVertexBuilder buffer = buffers.getBuffer(Atlases.getEntityTranslucent());
IVertexBuilder buffer = buffers.getBuffer(Atlases.getTranslucentBlockType());
renderIcon(ms, buffer, sprite, color, alpha, overlay, lava ? 0xF000F0 : light);
ms.pop();
}
@@ -126,12 +126,12 @@ public class RenderTileAltar extends TileEntityRenderer<TileAltar> {
int red = ((color >> 16) & 0xFF);
int green = ((color >> 8) & 0xFF);
int blue = (color & 0xFF);
Matrix4f mat = ms.peek().getModel();
Matrix4f mat = ms.getLast().getMatrix();
// todo 1.15 check the normals
builder.vertex(mat, 0, 16, 0).color(red, green, blue, (int) (alpha * 255F)).texture(sprite.getMinU(), sprite.getMaxV()).overlay(overlay).light(light).normal(0, 0, 1).endVertex();
builder.vertex(mat, 16, 16, 0).color(red, green, blue, (int) (alpha * 255F)).texture(sprite.getMaxU(), sprite.getMaxV()).overlay(overlay).light(light).normal(0, 0, 1).endVertex();
builder.vertex(mat, 16, 0, 0).color(red, green, blue, (int) (alpha * 255F)).texture(sprite.getMaxU(), sprite.getMinV()).overlay(overlay).light(light).normal(0, 0, 1).endVertex();
builder.vertex(mat, 0, 0, 0).color(red, green, blue, (int) (alpha * 255F)).texture(sprite.getMinU(), sprite.getMinV()).overlay(overlay).light(light).normal(0, 0, 1).endVertex();
builder.pos(mat, 0, 16, 0).color(red, green, blue, (int) (alpha * 255F)).tex(sprite.getMinU(), sprite.getMaxV()).overlay(overlay).lightmap(light).normal(0, 0, 1).endVertex();
builder.pos(mat, 16, 16, 0).color(red, green, blue, (int) (alpha * 255F)).tex(sprite.getMaxU(), sprite.getMaxV()).overlay(overlay).lightmap(light).normal(0, 0, 1).endVertex();
builder.pos(mat, 16, 0, 0).color(red, green, blue, (int) (alpha * 255F)).tex(sprite.getMaxU(), sprite.getMinV()).overlay(overlay).lightmap(light).normal(0, 0, 1).endVertex();
builder.pos(mat, 0, 0, 0).color(red, green, blue, (int) (alpha * 255F)).tex(sprite.getMinU(), sprite.getMinV()).overlay(overlay).lightmap(light).normal(0, 0, 1).endVertex();
}
}
@@ -48,13 +48,13 @@ public class RenderTileAnimatedTorch extends TileEntityRenderer<TileAnimatedTorc
ms.translate(xt, yt, zt);
ms.scale(2, 2, 2);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
ms.rotate(Vector3f.XP.rotationDegrees(90));
float rotation = (float) te.rotation;
if (te.rotating) {
rotation += te.anglePerTick * partialTicks;
}
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(rotation));
ms.rotate(Vector3f.ZP.rotationDegrees(rotation));
mc.getItemRenderer().renderItem(new ItemStack(Blocks.REDSTONE_TORCH), ItemCameraTransforms.TransformType.GROUND, light, overlay, ms, buffers);
ms.pop();
}
@@ -59,8 +59,8 @@ public class RenderTileAvatar extends TileEntityRenderer<TileAvatar> {
ms.translate(0.5F, 1.6F, 0.5F);
ms.scale(1F, -1F, -1F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(ROTATIONS[Math.max(Math.min(ROTATIONS.length - 1, facing.getIndex() - 2), 0)]));
IVertexBuilder buffer = buffers.getBuffer(model.getLayer(texture));
ms.rotate(Vector3f.YP.rotationDegrees(ROTATIONS[Math.max(Math.min(ROTATIONS.length - 1, facing.getIndex() - 2), 0)]));
IVertexBuilder buffer = buffers.getBuffer(model.getRenderType(texture));
model.render(ms, buffer, light, overlay, 1, 1, 1, 1);
if (avatar != null) {
@@ -70,7 +70,7 @@ public class RenderTileAvatar extends TileEntityRenderer<TileAvatar> {
float s = 0.6F;
ms.scale(s, s, s);
ms.translate(-0.5F, 2F, -0.25F);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(-70));
ms.rotate(Vector3f.XP.rotationDegrees(-70));
Minecraft.getInstance().getItemRenderer().renderItem(stack, ItemCameraTransforms.TransformType.THIRD_PERSON_RIGHT_HAND, light, overlay, ms, buffers);
ms.pop();
@@ -53,9 +53,9 @@ public class RenderTileBellows extends TileEntityRenderer<TileBellows> {
break;
}
}
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle));
ms.rotate(Vector3f.YP.rotationDegrees(angle));
float fract = Math.max(0.1F, 1F - (bellows == null ? 0 : bellows.movePos + bellows.moving * f + 0.1F));
IVertexBuilder buffer = buffers.getBuffer(model.getLayer(texture));
IVertexBuilder buffer = buffers.getBuffer(model.getRenderType(texture));
model.render(ms, buffer, light, overlay, 1, 1, 1, 1, fract);
ms.pop();
}
@@ -42,12 +42,12 @@ public class RenderTileCocoon extends TileEntityRenderer<TileCocoon> {
ms.push();
ms.translate(0.5, 0, 0);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(rot));
ms.rotate(Vector3f.XP.rotationDegrees(rot));
ms.translate(-0.5, 0, 0);
BlockState state = cocoon.getBlockState();
IBakedModel model = Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelShapes().getModel(state);
IVertexBuilder buffer = buffers.getBuffer(RenderTypeLookup.getBlockLayer(state));
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffer, state, model, 1, 1, 1, light, overlay);
IVertexBuilder buffer = buffers.getBuffer(RenderTypeLookup.getChunkRenderType(state));
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, state, model, 1, 1, 1, light, overlay);
ms.pop();
}
}
@@ -75,7 +75,7 @@ public class RenderTileCorporeaCrystalCube extends TileEntityRenderer<TileCorpor
float s = stack.getItem() instanceof BlockItem ? 0.7F : 0.5F;
ms.translate(0F, 0.8F, 0F);
ms.scale(s, s, s);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180F));
ms.rotate(Vector3f.ZP.rotationDegrees(180F));
itemRenderer.render(entity, 0, f, ms, buffers, light);
ms.pop();
}
@@ -83,8 +83,8 @@ public class RenderTileCorporeaCrystalCube extends TileEntityRenderer<TileCorpor
if (cubeModel != null) {
ms.push();
ms.translate(-0.5F, 0.25F, -0.5F);
IVertexBuilder buffer = buffers.getBuffer(Atlases.getEntityTranslucent());
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffer, null, cubeModel, 1, 1, 1, light, overlay);
IVertexBuilder buffer = buffers.getBuffer(Atlases.getTranslucentBlockType());
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, null, cubeModel, 1, 1, 1, light, overlay);
ms.pop();
}
@@ -110,11 +110,11 @@ public class RenderTileCorporeaCrystalCube extends TileEntityRenderer<TileCorpor
ms.translate(0F, 55F, 0F);
float tr = -16.5F;
for (int i = 0; i < 4; i++) {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90F));
ms.rotate(Vector3f.YP.rotationDegrees(90F));
ms.translate(0F, 0F, tr);
mc.fontRenderer.draw(countStr, -l / 2, 0, color, false, ms.peek().getModel(), buffers, false, 0, light);
mc.fontRenderer.renderString(countStr, -l / 2, 0, color, false, ms.getLast().getMatrix(), buffers, false, 0, light);
ms.translate(0F, 0F, 0.1F);
mc.fontRenderer.draw(countStr, -l / 2 + 1, 1, colorShade, false, ms.peek().getModel(), buffers, false, 0, light);
mc.fontRenderer.renderString(countStr, -l / 2 + 1, 1, colorShade, false, ms.getLast().getMatrix(), buffers, false, 0, light);
ms.translate(0F, 0F, -tr - 0.1F);
}
}
@@ -35,9 +35,9 @@ public class RenderTileCorporeaIndex extends TileEntityRenderer<TileCorporeaInde
public RenderTileCorporeaIndex(TileEntityRendererDispatcher manager) {
super(manager);
this.ring = new ModelRenderer(64, 32, 0, 0);
this.ring.addCuboid(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F);
this.ring.addBox(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F);
this.cube = new ModelRenderer(64, 32, 32, 0);
this.cube.addCuboid(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F);
this.cube.addBox(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F);
}
@Override
@@ -50,17 +50,17 @@ public class RenderTileCorporeaIndex extends TileEntityRenderer<TileCorporeaInde
ms.push();
ms.translate(0.0D, -1, 0.0D);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(rotation));
ms.rotate(Vector3f.YP.rotationDegrees(rotation));
ms.translate(0.0D, 1.5F + translation / 2.0F, 0.0D);
ms.multiply(new Quaternion(new Vector3f(ANGLE, 0.0F, ANGLE), 60.0F, true));
ms.rotate(new Quaternion(new Vector3f(ANGLE, 0.0F, ANGLE), 60.0F, true));
this.ring.render(ms, buffer, light, overlay);
ms.scale(0.875F, 0.875F, 0.875F);
ms.multiply(new Quaternion(new Vector3f(ANGLE, 0.0F, ANGLE), 60.0F, true));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(rotation));
ms.rotate(new Quaternion(new Vector3f(ANGLE, 0.0F, ANGLE), 60.0F, true));
ms.rotate(Vector3f.YP.rotationDegrees(rotation));
this.ring.render(ms, buffer, light, overlay);
ms.scale(0.875F, 0.875F, 0.875F);
ms.multiply(new Quaternion(new Vector3f(ANGLE, 0.0F, ANGLE), 60.0F, true));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(rotation));
ms.rotate(new Quaternion(new Vector3f(ANGLE, 0.0F, ANGLE), 60.0F, true));
ms.rotate(Vector3f.YP.rotationDegrees(rotation));
this.cube.render(ms, buffer, light, overlay);
ms.pop();
@@ -56,11 +56,11 @@ public class RenderTileEnchanter extends TileEntityRenderer<TileEnchanter> {
item.setItem(enchanter.itemToEnchant);
ms.translate(0.5F, 1.25F, 0.5F);
Minecraft.getInstance().getRenderManager().render(item, 0, 0, 0, 0, f, ms, buffers, light);
Minecraft.getInstance().getRenderManager().renderEntityStatic(item, 0, 0, 0, 0, f, ms, buffers, light);
ms.translate(-0.5F, -1.25F, -0.5F);
}
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90F));
ms.rotate(Vector3f.XP.rotationDegrees(90F));
ms.translate(-2F, -2F, -0.001F);
float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.4D) * alphaMod;
@@ -74,7 +74,7 @@ public class RenderTileEnchanter extends TileEntityRenderer<TileEnchanter> {
ms.translate(2.5F, 2.5F, -yTranslation);
ms.scale(scale, scale, 1F);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(angle));
ms.rotate(Vector3f.ZP.rotationDegrees(angle));
ms.translate(-2.5F, -2.5F, 0F);
}
@@ -55,17 +55,17 @@ public class RenderTileFloatingFlower extends TileEntityRenderer {
}
ms.translate(0.5F, 0, 0.5F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-((float) worldTime * 0.5F)));
ms.rotate(Vector3f.YP.rotationDegrees(-((float) worldTime * 0.5F)));
ms.translate(-0.5, (float) Math.sin(worldTime * 0.05F) * 0.1F, 0.5);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(4F * (float) Math.sin(worldTime * 0.04F)));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90.0F));
ms.rotate(Vector3f.XP.rotationDegrees(4F * (float) Math.sin(worldTime * 0.04F)));
ms.rotate(Vector3f.YP.rotationDegrees(90.0F));
BlockRendererDispatcher brd = Minecraft.getInstance().getBlockRendererDispatcher();
BlockState state = tile.getBlockState();
IBakedModel ibakedmodel = brd.getModelForState(state);
brd.getBlockModelRenderer().renderModel(ms.peek(), buffers.getBuffer(RenderTypeLookup.getEntityBlockLayer(state)), state, ibakedmodel, 1, 1, 1, light, overlay, data);
brd.getBlockModelRenderer().renderModel(ms.getLast(), buffers.getBuffer(RenderTypeLookup.getRenderType(state)), state, ibakedmodel, 1, 1, 1, light, overlay, data);
ms.pop();
@@ -124,8 +124,8 @@ public class RenderTileGaiaHead extends SkullTileEntityRenderer {
ms.scale(-1.0F, -1.0F, 1.0F);
IVertexBuilder ivertexbuilder = buffers.getBuffer(layerFor(type, profile));
genericheadmodel.render(partialTicks, rotation, 0.0F);
genericheadmodel.render(ms, ivertexbuilder, light, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
genericheadmodel.func_225603_a_(partialTicks, rotation, 0.0F);
genericheadmodel.render(ms, ivertexbuilder, light, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
ms.pop();
}
@@ -60,14 +60,14 @@ public class RenderTileHourglass extends TileEntityRenderer<TileHourglass> {
if (hasWorld && hourglass.flipTicks > 0) {
rot += (hourglass.flipTicks - ticks) * (180F / 4F);
}
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(rot));
ms.rotate(Vector3f.ZP.rotationDegrees(rot));
ms.scale(1F, -1F, -1F);
int color = hasWorld ? hourglass.getColor() : 0;
float r = (color >> 16) / 255.0F;
float g = (color >> 8) / 255.0F;
float b = (color & 0xFF) / 255.0F;
IVertexBuilder buffer = buffers.getBuffer(model.getLayer(texture));
IVertexBuilder buffer = buffers.getBuffer(model.getRenderType(texture));
model.render(ms, buffer, light, overlay, r, g, b, 1, fract1, fract2, hasWorld && hourglass.flip);
ms.pop();
}
@@ -47,7 +47,7 @@ public class RenderTileIncensePlate extends TileEntityRenderer<TileIncensePlate>
ms.push();
ms.translate(0.5F, 1.5F, 0.5F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(ROTATIONS.get(facing)));
ms.rotate(Vector3f.YP.rotationDegrees(ROTATIONS.get(facing)));
float s = 0.6F;
ms.translate(-0.11F, -1.35F, 0F);
ms.scale(s, s, s);
@@ -65,12 +65,12 @@ public class RenderTileLightRelay extends TileEntityRenderer<TileLightRelay> {
float scale = 0.75F;
ms.scale(scale, scale, scale);
ms.multiply(mc.getRenderManager().getRotation());
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180.0F));
ms.rotate(mc.getRenderManager().getCameraOrientation());
ms.rotate(Vector3f.YP.rotationDegrees(180.0F));
float off = 0.25F;
ms.translate(0F, off, 0F);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion((float) time));
ms.rotate(Vector3f.ZP.rotationDegrees((float) time));
ms.translate(0F, -off, 0F);
IVertexBuilder buffer = buffers.getBuffer(RenderHelper.LIGHT_RELAY);
@@ -91,12 +91,12 @@ public class RenderTileLightRelay extends TileEntityRenderer<TileLightRelay> {
float f5 = 0.5F;
float f6 = 0.25F;
Matrix4f mat = ms.peek().getModel();
Matrix4f mat = ms.getLast().getMatrix();
int fullbright = 0xF000F0;
buffer.vertex(mat, 0.0F - f5, 0.0F - f6, 0.0F).color(1F, 1F, 1F, 1F).texture(f, f3).light(fullbright).endVertex();
buffer.vertex(mat, f4 - f5, 0.0F - f6, 0.0F).color(1F, 1F, 1F, 1F).texture(f1, f3).light(fullbright).endVertex();
buffer.vertex(mat, f4 - f5, f4 - f6, 0.0F).color(1F, 1F, 1F, 1F).texture(f1, f2).light(fullbright).endVertex();
buffer.vertex(mat, 0.0F - f5, f4 - f6, 0.0F).color(1F, 1F, 1F, 1F).texture(f, f2).light(fullbright).endVertex();
buffer.pos(mat, 0.0F - f5, 0.0F - f6, 0.0F).color(1F, 1F, 1F, 1F).tex(f, f3).lightmap(fullbright).endVertex();
buffer.pos(mat, f4 - f5, 0.0F - f6, 0.0F).color(1F, 1F, 1F, 1F).tex(f1, f3).lightmap(fullbright).endVertex();
buffer.pos(mat, f4 - f5, f4 - f6, 0.0F).color(1F, 1F, 1F, 1F).tex(f1, f2).lightmap(fullbright).endVertex();
buffer.pos(mat, 0.0F - f5, f4 - f6, 0.0F).color(1F, 1F, 1F, 1F).tex(f, f2).lightmap(fullbright).endVertex();
}
@@ -66,9 +66,9 @@ public class RenderTilePool extends TileEntityRenderer<TilePool> {
int blue = color & 0xFF;
BlockState state = pool.getBlockState();
IBakedModel model = Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelShapes().getModel(state);
IVertexBuilder buffer = buffers.getBuffer(RenderTypeLookup.getEntityBlockLayer(state));
IVertexBuilder buffer = buffers.getBuffer(RenderTypeLookup.getRenderType(state));
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer()
.render(ms.peek(), buffer, state, model, red / 255F, green / 255F, blue / 255F, light, overlay);
.renderModelBrightnessColor(ms.getLast(), buffer, state, model, red / 255F, green / 255F, blue / 255F, light, overlay);
}
ms.translate(0.5F, 1.5F, 0.5F);
@@ -93,7 +93,7 @@ public class RenderTilePool extends TileEntityRenderer<TilePool> {
ms.push();
float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 20.0) + 1) * 0.3 + 0.2);
ms.translate(-0.5F, -1F - 0.43F, -0.5F);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90F));
ms.rotate(Vector3f.XP.rotationDegrees(90F));
ms.scale(s, s, s);
IVertexBuilder buffer = buffers.getBuffer(RenderHelper.ICON_OVERLAY);
@@ -108,7 +108,7 @@ public class RenderTilePool extends TileEntityRenderer<TilePool> {
s = 1F / 256F * 14F;
ms.push();
ms.translate(w, -1F - (0.43F - waterLevel), w);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90F));
ms.rotate(Vector3f.XP.rotationDegrees(90F));
ms.scale(s, s, s);
IVertexBuilder buffer = buffers.getBuffer(RenderHelper.MANA_POOL_WATER);
@@ -41,7 +41,7 @@ public class RenderTilePrism extends TileEntityRenderer<TilePrism> {
Minecraft.getInstance().textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
if (stack.getItem() instanceof ILens) {
ms.push();
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
ms.rotate(Vector3f.XP.rotationDegrees(90));
ms.translate(0.5F, 0.5F, pos);
Minecraft.getInstance().getItemRenderer().renderItem(stack, ItemCameraTransforms.TransformType.NONE, light, overlay, ms, buffers);
ms.pop();
@@ -48,12 +48,12 @@ public class RenderTilePump extends TileEntityRenderer<TilePump> {
angle = 90;
break;
}
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle));
ms.rotate(Vector3f.YP.rotationDegrees(angle));
ms.translate(-0.5, 0, -0.5);
double diff = Math.max(0F, Math.min(8F, pump.innerRingPos + pump.moving * partialTicks));
ms.translate(0, 0, diff / 14);
IVertexBuilder buffer = buffers.getBuffer(RenderType.getSolid());
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffer, null, headModel, 1, 1, 1, light, overlay);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, null, headModel, 1, 1, 1, light, overlay);
ms.pop();
}
}
@@ -102,7 +102,7 @@ public class RenderTilePylon extends TileEntityRenderer<TilePylon> {
ms.push();
ms.translate(0.5F, 0F, -0.5F);
if (pylon != null) {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(worldTime * 1.5F));
ms.rotate(Vector3f.YP.rotationDegrees(worldTime * 1.5F));
}
RenderType layer = RenderType.getEntityTranslucent(texture);
@@ -121,7 +121,7 @@ public class RenderTilePylon extends TileEntityRenderer<TilePylon> {
ms.translate(0.5F, 0F, -0.5F);
if (pylon != null) {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-worldTime));
ms.rotate(Vector3f.YP.rotationDegrees(-worldTime));
}
buffer = buffers.getBuffer(shaderLayer);
@@ -94,7 +94,7 @@ public class RenderTileRedString extends TileEntityRenderer<TileRedString> {
int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = color & 0xFF;
buffer.vertex(ms.peek().getModel(), (float) x, (float) y, (float) z).color(r, g, b, a).endVertex();
buffer.pos(ms.getLast().getMatrix(), (float) x, (float) y, (float) z).color(r, g, b, a).endVertex();
}
}
@@ -31,7 +31,7 @@ public class RenderTileRuneAltar extends TileEntityRenderer<TileRuneAltar> {
public RenderTileRuneAltar(TileEntityRendererDispatcher manager) {
super(manager);
spinningCube.addCuboid(0F, 0F, 0F, 1, 1, 1);
spinningCube.addBox(0F, 0F, 0F, 1, 1, 1);
spinningCube.setRotationPoint(0F, 0F, 0F);
spinningCube.setTextureSize(64, 64);
}
@@ -61,9 +61,9 @@ public class RenderTileRuneAltar extends TileEntityRenderer<TileRuneAltar> {
for (int i = 0; i < altar.getSizeInventory(); i++) {
ms.push();
ms.translate(0.5F, 1.25F, 0.5F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angles[i] + (float) time));
ms.rotate(Vector3f.YP.rotationDegrees(angles[i] + (float) time));
ms.translate(1.125F, 0F, 0.25F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90F));
ms.rotate(Vector3f.YP.rotationDegrees(90F));
ms.translate(0D, 0.075 * Math.sin((time + i * 10) / 5D), 0F);
ItemStack stack = altar.getItemHandler().getStackInSlot(i);
Minecraft mc = Minecraft.getInstance();
@@ -75,7 +75,7 @@ public class RenderTileRuneAltar extends TileEntityRenderer<TileRuneAltar> {
ms.push();
ms.translate(0.5F, 1.8F, 0.5F);
ms.multiply(new Vector3f(1, 0, 1).getDegreesQuaternion(180F));
ms.rotate(new Vector3f(1, 0, 1).rotationDegrees(180F));
renderSpinningCubes(ms, buffers, overlay, 2, 15);
ms.pop();
@@ -119,7 +119,7 @@ public class RenderTileRuneAltar extends TileEntityRenderer<TileRuneAltar> {
float yRotate = (float) Math.max(0.6F, Math.sin(ticks * 0.1F) / 2F + 0.5F);
float zRotate = (float) Math.cos(ticks * rotationModifier) / 2F;
ms.multiply(new Vector3f(xRotate, yRotate, zRotate).getDegreesQuaternion(deg));
ms.rotate(new Vector3f(xRotate, yRotate, zRotate).rotationDegrees(deg));
float alpha = 1;
if (curIter < iters) {
alpha = (float) curIter / (float) iters * 0.4F;
@@ -31,11 +31,11 @@ public class RenderTileSparkChanger extends TileEntityRenderer<TileSparkChanger>
@Override
public void render(@Nonnull TileSparkChanger tileentity, float pticks, MatrixStack ms, IRenderTypeBuffer buffers, int light, int overlay) {
ms.push();
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
ms.rotate(Vector3f.XP.rotationDegrees(90));
ms.translate(1.0F, -0.125F, -0.25F);
ItemStack stack = tileentity.getItemHandler().getStackInSlot(0);
if (!stack.isEmpty()) {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180));
ms.rotate(Vector3f.YP.rotationDegrees(180));
ms.translate(0.5F, 0.5F, 0);
Minecraft.getInstance().getItemRenderer().renderItem(stack, ItemCameraTransforms.TransformType.GROUND, light, overlay, ms, buffers);
}
@@ -46,9 +46,9 @@ public class RenderTileSpreader extends TileEntityRenderer<TileSpreader> {
ms.translate(0.5F, 0.5, 0.5F);
Quaternion transform = Vector3f.POSITIVE_Y.getDegreesQuaternion(spreader.rotationX + 90F);
transform.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(spreader.rotationY));
ms.multiply(transform);
Quaternion transform = Vector3f.YP.rotationDegrees(spreader.rotationX + 90F);
transform.multiply(Vector3f.XP.rotationDegrees(spreader.rotationY));
ms.rotate(transform);
ms.translate(-0.5F, -0.5F, -0.5F);
@@ -62,20 +62,20 @@ public class RenderTileSpreader extends TileEntityRenderer<TileSpreader> {
b = (color & 0xFF) / 255F;
}
IVertexBuilder buffer = buffers.getBuffer(RenderTypeLookup.getEntityBlockLayer(spreader.getBlockState()));
IVertexBuilder buffer = buffers.getBuffer(RenderTypeLookup.getRenderType(spreader.getBlockState()));
IBakedModel bakedModel = Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(spreader.getBlockState());
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer()
.render(ms.peek(), buffer, spreader.getBlockState(),
.renderModelBrightnessColor(ms.getLast(), buffer, spreader.getBlockState(),
bakedModel, r, g, b, light, overlay);
ms.push();
ms.translate(0.5, 0.5, 0.5);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion((float) time % 360));
ms.rotate(Vector3f.YP.rotationDegrees((float) time % 360));
ms.translate(-0.5, -0.5, -0.5);
ms.translate(0F, (float) Math.sin(time / 20.0) * 0.05F, 0F);
IBakedModel cube = getInsideModel(spreader);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer()
.render(ms.peek(), buffer, spreader.getBlockState(),
.renderModelBrightnessColor(ms.getLast(), buffer, spreader.getBlockState(),
cube, 1, 1, 1, light, overlay);
ms.pop();
@@ -85,8 +85,8 @@ public class RenderTileSpreader extends TileEntityRenderer<TileSpreader> {
if (!stack.isEmpty()) {
ms.push();
ms.translate(0.0F, -1F, -0.4675F);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180));
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(180));
ms.rotate(Vector3f.ZP.rotationDegrees(180));
ms.rotate(Vector3f.XP.rotationDegrees(180));
ms.scale(1.0F, 1.0F, 1.0F);
Minecraft.getInstance().getItemRenderer().renderItem(stack, ItemCameraTransforms.TransformType.NONE, light, overlay, ms, buffers);
ms.pop();
@@ -95,42 +95,42 @@ public class RenderTileSpreader extends TileEntityRenderer<TileSpreader> {
if (spreader.paddingColor != null) {
BlockState carpet = ColorHelper.CARPET_MAP.get(spreader.paddingColor).get().getDefaultState();
IBakedModel model = Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(carpet);
buffer = buffers.getBuffer(RenderTypeLookup.getEntityBlockLayer(carpet));
buffer = buffers.getBuffer(RenderTypeLookup.getRenderType(carpet));
float f = 1 / 16F;
// back
ms.push();
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
ms.rotate(Vector3f.XP.rotationDegrees(90));
ms.translate(-0.5F, 0.5F - f, 0.5F);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffer, carpet, model, 1, 1, 1, light, overlay);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, carpet, model, 1, 1, 1, light, overlay);
ms.pop();
// left
ms.push();
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(-90));
ms.rotate(Vector3f.ZP.rotationDegrees(-90));
ms.translate(0.5F, 0.5F, -0.5F - f);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffer, carpet, model, 1, 1, 1, light, overlay);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, carpet, model, 1, 1, 1, light, overlay);
ms.pop();
// right
ms.push();
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(90));
ms.rotate(Vector3f.ZP.rotationDegrees(90));
ms.translate(-1.5F, 0.5F, -0.5F - f);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffer, carpet, model, 1, 1, 1, light, overlay);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, carpet, model, 1, 1, 1, light, overlay);
ms.pop();
// top
ms.push();
ms.translate(-0.5F, -0.5F, -0.5F - f);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffer, carpet, model, 1, 1, 1, light, overlay);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, carpet, model, 1, 1, 1, light, overlay);
ms.pop();
// bottom
ms.push();
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180));
ms.rotate(Vector3f.YP.rotationDegrees(180));
ms.translate(-0.5F, -1.5F - f, -0.5F + f);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffer, carpet, model, 1, 1, 1, light, overlay);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffer, carpet, model, 1, 1, 1, light, overlay);
ms.pop();
}
@@ -40,10 +40,10 @@ public class RenderTileStarfield extends TileEntityRenderer<TileStarfield> {
public void render(TileStarfield p_225616_1_, float p_225616_2_, MatrixStack p_225616_3_, IRenderTypeBuffer p_225616_4_, int p_225616_5_, int p_225616_6_) {
RANDOM.setSeed(31100L);
double d0 = p_225616_1_.getPos().distanceSq(this.dispatcher.renderInfo.getProjectedView(), true);
double d0 = p_225616_1_.getPos().distanceSq(this.renderDispatcher.renderInfo.getProjectedView(), true);
int i = this.getPasses(d0);
float f = this.getOffset();
Matrix4f matrix4f = p_225616_3_.peek().getModel();
Matrix4f matrix4f = p_225616_3_.getLast().getMatrix();
this.func_228883_a_(p_225616_1_, f, 0.15F, matrix4f, p_225616_4_.getBuffer(field_228881_e_.get(0)));
for (int j = 1; j < i; ++j) {
@@ -73,10 +73,10 @@ public class RenderTileStarfield extends TileEntityRenderer<TileStarfield> {
private void func_228884_a_(TileStarfield p_228884_1_, Matrix4f p_228884_2_, IVertexBuilder p_228884_3_, float p_228884_4_, float p_228884_5_, float p_228884_6_, float p_228884_7_, float p_228884_8_, float p_228884_9_, float p_228884_10_, float p_228884_11_, float p_228884_12_, float p_228884_13_, float p_228884_14_, Direction p_228884_15_) {
if (p_228884_15_ == Direction.UP) { // Botania: up face only
p_228884_3_.vertex(p_228884_2_, p_228884_4_, p_228884_6_, p_228884_8_).color(p_228884_12_, p_228884_13_, p_228884_14_, 1.0F).endVertex();
p_228884_3_.vertex(p_228884_2_, p_228884_5_, p_228884_6_, p_228884_9_).color(p_228884_12_, p_228884_13_, p_228884_14_, 1.0F).endVertex();
p_228884_3_.vertex(p_228884_2_, p_228884_5_, p_228884_7_, p_228884_10_).color(p_228884_12_, p_228884_13_, p_228884_14_, 1.0F).endVertex();
p_228884_3_.vertex(p_228884_2_, p_228884_4_, p_228884_7_, p_228884_11_).color(p_228884_12_, p_228884_13_, p_228884_14_, 1.0F).endVertex();
p_228884_3_.pos(p_228884_2_, p_228884_4_, p_228884_6_, p_228884_8_).color(p_228884_12_, p_228884_13_, p_228884_14_, 1.0F).endVertex();
p_228884_3_.pos(p_228884_2_, p_228884_5_, p_228884_6_, p_228884_9_).color(p_228884_12_, p_228884_13_, p_228884_14_, 1.0F).endVertex();
p_228884_3_.pos(p_228884_2_, p_228884_5_, p_228884_7_, p_228884_10_).color(p_228884_12_, p_228884_13_, p_228884_14_, 1.0F).endVertex();
p_228884_3_.pos(p_228884_2_, p_228884_4_, p_228884_7_, p_228884_11_).color(p_228884_12_, p_228884_13_, p_228884_14_, 1.0F).endVertex();
}
}
@@ -36,7 +36,7 @@ public class RenderTileTerraPlate extends TileEntityRenderer<TileTerraPlate> {
float alphaMod = Math.min(max, plate.getCurrentMana()) / max;
ms.push();
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90F));
ms.rotate(Vector3f.XP.rotationDegrees(90F));
ms.translate(0F, 0F, -3F / 16F - 0.001F);
float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.6D) * alphaMod;
@@ -40,7 +40,7 @@ public class RenderTileTeruTeruBozu extends TileEntityRenderer<TileTeruTeruBozu>
@Override
public void render(@Nullable TileTeruTeruBozu tileentity, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers, int light, int overlay) {
ms.push();
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(180));
ms.rotate(Vector3f.XP.rotationDegrees(180));
double time = Botania.proxy.getWorldElapsedTicks() + partialTicks;
boolean hasWorld = tileentity != null && tileentity.getWorld() != null;
if (hasWorld) {
@@ -49,13 +49,13 @@ public class RenderTileTeruTeruBozu extends TileEntityRenderer<TileTeruTeruBozu>
ms.translate(0.5F, -1.25F + (hasWorld ? (float) Math.sin(time * 0.01F) * 0.05F : 0F), -0.5F);
if (hasWorld) {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion((float) (time * 0.3)));
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(4F * (float) Math.sin(time * 0.05F)));
ms.rotate(Vector3f.YP.rotationDegrees((float) (time * 0.3)));
ms.rotate(Vector3f.ZP.rotationDegrees(4F * (float) Math.sin(time * 0.05F)));
float s = 0.75F;
ms.scale(s, s, s);
}
IVertexBuilder buffer = buffers.getBuffer(model.getLayer(ClientProxy.dootDoot ? textureHalloween : texture));
IVertexBuilder buffer = buffers.getBuffer(model.getRenderType(ClientProxy.dootDoot ? textureHalloween : texture));
model.render(ms, buffer, light, overlay, 1, 1, 1, 1);
ms.pop();
}
@@ -60,7 +60,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
public RenderTileTinyPotato(TileEntityRendererDispatcher manager) {
super(manager);
potatoModel.addCuboid(0F, 0F, 0F, 4, 6, 4);
potatoModel.addBox(0F, 0F, 0F, 4, 6, 4);
potatoModel.setRotationPoint(-2F, 18F, -2F);
potatoModel.setTextureSize(64, 32);
}
@@ -135,7 +135,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
rotY = 90F;
break;
}
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(rotY));
ms.rotate(Vector3f.YP.rotationDegrees(rotY));
float jump = potato.jumpTicks;
if (jump > 0) {
@@ -146,7 +146,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
float rotZ = (float) Math.sin(jump / 10 * Math.PI) * 2;
ms.translate(0F, up, 0F);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(rotZ));
ms.rotate(Vector3f.ZP.rotationDegrees(rotZ));
ms.push();
float r = 1;
@@ -159,7 +159,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
break;
case "dinnerbone":
case "grumm":
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180F));
ms.rotate(Vector3f.ZP.rotationDegrees(180F));
ms.translate(0F, -2.625F, 0F);
break;
case "aureylian":
@@ -184,8 +184,8 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
MinecraftForge.EVENT_BUS.post(new TinyPotatoRenderEvent(potato, potato.name, partialTicks, ms, buffers, light, overlay));
ms.pop();
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(-rotZ));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-rotY));
ms.rotate(Vector3f.ZP.rotationDegrees(-rotZ));
ms.rotate(Vector3f.YP.rotationDegrees(-rotY));
ms.scale(1F, -1F, -1F);
renderName(potato, name, ms, buffers, light);
@@ -199,23 +199,23 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
&& potato.getPos().equals(((BlockRayTraceResult) pos).getPos())) {
ms.push();
ms.translate(0F, -0.6F, 0F);
ms.multiply(mc.getRenderManager().getRotation());
ms.rotate(mc.getRenderManager().getCameraOrientation());
float f1 = 0.016666668F * 1.6F;
ms.scale(-f1, -f1, f1);
ms.translate(0.0F, 0F / f1, 0.0F);
int halfWidth = mc.fontRenderer.getStringWidth(potato.name.getString()) / 2;
float opacity = Minecraft.getInstance().gameSettings.func_216840_a(0.25F);
float opacity = Minecraft.getInstance().gameSettings.getTextBackgroundOpacity(0.25F);
int opacityRGB = (int) (opacity * 255.0F) << 24;
mc.fontRenderer.draw(potato.name.getFormattedText(), -halfWidth, 0, 0x20FFFFFF, false, ms.peek().getModel(), buffers, true, opacityRGB, light);
mc.fontRenderer.draw(potato.name.getFormattedText(), -halfWidth, 0, 0xFFFFFFFF, false, ms.peek().getModel(), buffers, false, 0, light);
mc.fontRenderer.renderString(potato.name.getFormattedText(), -halfWidth, 0, 0x20FFFFFF, false, ms.getLast().getMatrix(), buffers, true, opacityRGB, light);
mc.fontRenderer.renderString(potato.name.getFormattedText(), -halfWidth, 0, 0xFFFFFFFF, false, ms.getLast().getMatrix(), buffers, false, 0, light);
if (name.equals("pahimar") || name.equals("soaryn")) {
ms.translate(0F, 14F, 0F);
String str = name.equals("pahimar") ? "[WIP]" : "(soon)";
halfWidth = mc.fontRenderer.getStringWidth(str) / 2;
mc.fontRenderer.draw(str, -halfWidth, 0, 0x20FFFFFF, false, ms.peek().getModel(), buffers, true, opacityRGB, light);
mc.fontRenderer.draw(str, -halfWidth, 0, 0xFFFFFFFF, false, ms.peek().getModel(), buffers, true, 0, light);
mc.fontRenderer.renderString(str, -halfWidth, 0, 0x20FFFFFF, false, ms.getLast().getMatrix(), buffers, true, opacityRGB, light);
mc.fontRenderer.renderString(str, -halfWidth, 0, 0xFFFFFFFF, false, ms.getLast().getMatrix(), buffers, true, 0, light);
}
ms.pop();
@@ -224,7 +224,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
private void renderItems(TileTinyPotato potato, Direction facing, String name, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers, int light, int overlay) {
ms.push();
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180F));
ms.rotate(Vector3f.ZP.rotationDegrees(180F));
ms.translate(0F, -1F, 0F);
float s = 1F / 3.5F;
ms.scale(s, s, s);
@@ -284,7 +284,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
} else if (block) {
ms.translate(-0.4F, 0.8F, 0F);
} else {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-90F));
ms.rotate(Vector3f.YP.rotationDegrees(-90F));
}
ms.translate(-0.3F, -1.9F, 0.04F);
break;
@@ -294,7 +294,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
} else if (block) {
ms.translate(1F, 0.8F, 1F);
} else {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-90F));
ms.rotate(Vector3f.YP.rotationDegrees(-90F));
}
ms.translate(-0.3F, -1.9F, -0.92F);
break;
@@ -306,7 +306,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
ms.scale(0.5F, 0.5F, 0.5F);
}
if (block && side == Direction.NORTH) {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180F));
ms.rotate(Vector3f.YP.rotationDegrees(180F));
}
renderItem(ms, buffers, light, overlay, stack);
ms.pop();
@@ -323,39 +323,39 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
if (name.equals("phi") || name.equals("vazkii")) {
ms.push();
ms.translate(-0.15, 0.1, 0.4);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90F));
ms.multiply(new Vector3f(1, 0, 1).getDegreesQuaternion(20));
ms.rotate(Vector3f.YP.rotationDegrees(90F));
ms.rotate(new Vector3f(1, 0, 1).rotationDegrees(20));
renderModel(ms, buffers, light, overlay, MiscellaneousIcons.INSTANCE.phiFlowerModel);
ms.pop();
if (name.equals("vazkii")) {
ms.scale(1.25F, 1.25F, 1.25F);
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(180F));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-90F));
ms.rotate(Vector3f.XP.rotationDegrees(180F));
ms.rotate(Vector3f.YP.rotationDegrees(-90F));
ms.translate(0.2, -1.25, 0);
renderModel(ms, buffers, light, overlay, MiscellaneousIcons.INSTANCE.nerfBatModel);
}
} else if (name.equals("haighyorkie")) {
ms.scale(1.25F, 1.25F, 1.25F);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180F));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-90F));
ms.rotate(Vector3f.ZP.rotationDegrees(180F));
ms.rotate(Vector3f.YP.rotationDegrees(-90F));
ms.translate(-0.5F, -1.2F, -0.075F);
renderModel(ms, buffers, light, overlay, MiscellaneousIcons.INSTANCE.goldfishModel);
} else if (name.equals("martysgames") || name.equals("marty")) {
ms.scale(0.7F, 0.7F, 0.7F);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180F));
ms.rotate(Vector3f.ZP.rotationDegrees(180F));
ms.translate(-0.3F, -2.7F, -1.2F);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(15F));
ms.rotate(Vector3f.ZP.rotationDegrees(15F));
renderItem(ms, buffers, light, overlay, new ItemStack(ModItems.infiniteFruit, 1).setDisplayName(new StringTextComponent("das boot")));
} else if (name.equals("jibril")) {
ms.scale(1.5F, 1.5F, 1.5F);
ms.translate(0F, -0.8F, 0F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90));
ms.rotate(Vector3f.YP.rotationDegrees(90));
ItemFlightTiara.renderHalo(null, ms, buffers, partialTicks);
} else if (name.equals("kingdaddydmac")) {
ms.scale(0.5F, 0.5F, 0.5F);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90));
ms.rotate(Vector3f.ZP.rotationDegrees(180));
ms.rotate(Vector3f.YP.rotationDegrees(90));
ms.push();
ms.translate(0F, -2.5F, 0.65F);
ItemStack ring = new ItemStack(ModItems.manaRing);
@@ -369,8 +369,8 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
} else {
ItemStack icon = ContributorFancinessHandler.getFlower(name);
if (!icon.isEmpty()) {
ms.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(180));
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180));
ms.rotate(Vector3f.XP.rotationDegrees(180));
ms.rotate(Vector3f.YP.rotationDegrees(180));
ms.translate(0, -0.75, -0.5);
RenderHelper.renderItemModelGold(null, icon, ItemCameraTransforms.TransformType.HEAD, ms, buffers, null, light, overlay);
}
@@ -380,7 +380,7 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
}
private void renderModel(MatrixStack ms, IRenderTypeBuffer buffers, int light, int overlay, IBakedModel model) {
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().render(ms.peek(), buffers.getBuffer(Atlases.getEntityTranslucent()), null, model, 1, 1, 1, light, overlay);
Minecraft.getInstance().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ms.getLast(), buffers.getBuffer(Atlases.getTranslucentBlockType()), null, model, 1, 1, 1, light, overlay);
}
private void renderItem(MatrixStack ms, IRenderTypeBuffer buffers, int light, int overlay, ItemStack stack) {
@@ -388,6 +388,6 @@ public class RenderTileTinyPotato extends TileEntityRenderer<TileTinyPotato> {
}
private void renderBlock(MatrixStack ms, IRenderTypeBuffer buffers, int light, int overlay, Block block) {
Minecraft.getInstance().getBlockRendererDispatcher().renderBlockAsEntity(block.getDefaultState(), ms, buffers, light, overlay);
Minecraft.getInstance().getBlockRendererDispatcher().renderBlock(block.getDefaultState(), ms, buffers, light, overlay);
}
}
@@ -59,7 +59,7 @@ public class BlockAltGrass extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack held = player.getHeldItem(hand);
if (held.getItem() instanceof HoeItem && world.isAirBlock(pos.up())) {
held.damageItem(1, player, e -> e.sendBreakAnimation(hand));
@@ -71,7 +71,7 @@ public class BlockAltGrass extends BlockMod {
}
@Override
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
public void tick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
if (!world.isRemote && state.getBlock() == this && world.getLight(pos.up()) >= 9) {
for (int l = 0; l < 4; ++l) {
BlockPos pos1 = pos.add(rand.nextInt(3) - 1, rand.nextInt(5) - 3, rand.nextInt(3) - 1);
@@ -99,7 +99,7 @@ public class BlockAltar extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileAltar tile = (TileAltar) world.getTileEntity(pos);
ItemStack stack = player.getHeldItem(hand);
if (player.isSneaking()) {
@@ -47,7 +47,7 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
}
@Override
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockRayTraceResult hit) {
if (hand == Hand.MAIN_HAND && playerIn.isSneaking() && playerIn.getHeldItem(hand).isEmpty()) {
((TileAnimatedTorch) worldIn.getTileEntity(pos)).handRotate();
return ActionResultType.SUCCESS;
@@ -64,7 +64,7 @@ public class BlockAvatar extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileAvatar avatar = (TileAvatar) world.getTileEntity(pos);
ItemStack stackOnAvatar = avatar.getItemHandler().getStackInSlot(0);
ItemStack stackOnPlayer = player.getHeldItem(hand);
@@ -68,7 +68,7 @@ public class BlockCocoon extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack stack = player.getHeldItem(hand);
return addStack(world, pos, stack, player.abilities.isCreativeMode);
}
@@ -55,8 +55,8 @@ public class BlockCraftyCrate extends BlockOpenCrate implements IWandHUD {
int width = 52;
int height = 52;
int xc = mc.getWindow().getScaledWidth() / 2 + 20;
int yc = mc.getWindow().getScaledHeight() / 2 - height / 2;
int xc = mc.getMainWindow().getScaledWidth() / 2 + 20;
int yc = mc.getMainWindow().getScaledHeight() / 2 - height / 2;
AbstractGui.fill(xc - 6, yc - 6, xc + width + 6, yc + height + 6, 0x22000000);
AbstractGui.fill(xc - 4, yc - 4, xc + width + 4, yc + height + 4, 0x22000000);
@@ -43,7 +43,7 @@ public class BlockFakeAir extends AirBlock {
}
@Override
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
public void tick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
if (shouldRemove(world, pos)) {
world.setBlockState(pos, rand.nextInt(10) == 0 ? Blocks.WATER.getDefaultState() : Blocks.AIR.getDefaultState());
}
@@ -106,12 +106,12 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ActionResultType tileResult = ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, hand, hit);
if (tileResult.isAccepted()) {
if (tileResult.isSuccessOrConsume()) {
return tileResult;
} else {
return super.onUse(state, world, pos, player, hand, hit);
return super.onBlockActivated(state, world, pos, player, hand, hit);
}
}
@@ -68,7 +68,7 @@ public class BlockHourglass extends BlockMod implements IManaTrigger, IWandable,
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileHourglass hourglass = (TileHourglass) world.getTileEntity(pos);
ItemStack hgStack = hourglass.getItemHandler().getStackInSlot(0);
ItemStack stack = player.getHeldItem(hand);
@@ -114,7 +114,7 @@ public class BlockHourglass extends BlockMod implements IManaTrigger, IWandable,
}
@Override
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
public void tick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
if (state.get(BlockStateProperties.POWERED)) {
world.setBlockState(pos, state.with(BlockStateProperties.POWERED, false));
}
@@ -49,7 +49,7 @@ public class BlockIncensePlate extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileIncensePlate plate = (TileIncensePlate) world.getTileEntity(pos);
ItemStack plateStack = plate.getItemHandler().getStackInSlot(0);
ItemStack stack = player.getHeldItem(hand);
@@ -59,7 +59,7 @@ public class BlockLightRelay extends BlockMod implements IWandable {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
((TileLightRelay) world.getTileEntity(pos)).mountEntity(player);
return ActionResultType.SUCCESS;
}
@@ -81,7 +81,7 @@ public class BlockLightRelay extends BlockMod implements IWandable {
}
@Override
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
public void tick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
world.setBlockState(pos, state.with(BlockStateProperties.POWERED, false));
}
@@ -58,8 +58,8 @@ public class BlockPlatform extends BlockMod implements IWandable, IManaCollision
if (variant == Variant.INFRANGIBLE
|| variant == Variant.ABSTRUSE
&& e != null
&& e.getY() > pos.getY() + 0.9
&& !context.isDescending()) {
&& e.getPosY() > pos.getY() + 0.9
&& !context.func_225581_b_()) {
return super.getCollisionShape(state, world, pos, context);
} else {
return VoxelShapes.empty();
@@ -99,7 +99,7 @@ public class BlockPlatform extends BlockMod implements IWandable, IManaCollision
@Nonnull
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileEntity tile = world.getTileEntity(pos);
ItemStack currentStack = player.getHeldItem(hand);
if (!currentStack.isEmpty()
@@ -32,7 +32,7 @@ public class BlockSolidVines extends VineBlock {
}
@Override
public void scheduledTick(@Nonnull BlockState state, ServerWorld world, @Nonnull BlockPos pos, @Nonnull Random rand) {}
public void tick(@Nonnull BlockState state, ServerWorld world, @Nonnull BlockPos pos, @Nonnull Random rand) {}
@Override
public boolean isShearable(ItemStack item, IWorldReader world, BlockPos pos) {
@@ -66,7 +66,7 @@ public class BlockSparkChanger extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileSparkChanger changer = (TileSparkChanger) world.getTileEntity(pos);
ItemStack pstack = player.getHeldItem(hand);
ItemStack cstack = changer.getItemHandler().getStackInSlot(0);
@@ -142,7 +142,7 @@ public class BlockSpecialFlower extends FlowerBlock implements IWandable, IWandH
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
return ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, hand, hit);
}
@@ -55,7 +55,7 @@ public class BlockTeruTeruBozu extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack stack = player.getHeldItem(hand);
if (!stack.isEmpty() && (isSunflower(stack) && removeRain(world) || isBlueOrchid(stack) && startRain(world))) {
if (!player.abilities.isCreativeMode) {
@@ -468,8 +468,8 @@ public final class ModBlocks {
register(r, new BlockMod(builder.lightValue(12)), LibBlockNames.DREAM_WOOD_GLIMMERING);
register(r, new BlockConjurationCatalyst(Block.Properties.create(Material.ROCK).hardnessAndResistance(2, 10).sound(SoundType.STONE)), LibBlockNames.CONJURATION_CATALYST);
register(r, new BlockBifrost(Block.Properties.create(Material.GLASS).hardnessAndResistance(-1, 0.3F).lightValue(15).sound(SoundType.GLASS).nonOpaque()), LibBlockNames.BIFROST);
register(r, new BlockSolidVines(Block.Properties.create(Material.TALL_PLANTS).hardnessAndResistance(0.2F).sound(SoundType.PLANT).nonOpaque()), LibBlockNames.SOLID_VINE);
register(r, new BlockBifrost(Block.Properties.create(Material.GLASS).hardnessAndResistance(-1, 0.3F).lightValue(15).sound(SoundType.GLASS).notSolid()), LibBlockNames.BIFROST);
register(r, new BlockSolidVines(Block.Properties.create(Material.TALL_PLANTS).hardnessAndResistance(0.2F).sound(SoundType.PLANT).notSolid()), LibBlockNames.SOLID_VINE);
builder = Block.Properties.create(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0).sound(SoundType.PLANT).lightValue(4);
for (DyeColor color : DyeColor.values()) {
@@ -492,9 +492,9 @@ public final class ModBlocks {
register(r, new BlockEnderEye(Block.Properties.create(Material.IRON).hardnessAndResistance(3, 10).sound(SoundType.METAL)), LibBlockNames.ENDER_EYE_BLOCK);
register(r, new BlockStarfield(Block.Properties.create(Material.IRON).hardnessAndResistance(5, 2000).sound(SoundType.METAL)), LibBlockNames.STARFIELD);
register(r, new BlockRFGenerator(Block.Properties.create(Material.ROCK).hardnessAndResistance(2, 10).sound(SoundType.STONE)), LibBlockNames.FLUXFIELD);
register(r, new BlockElfGlass(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).sound(SoundType.GLASS).lightValue(15).nonOpaque()), LibBlockNames.ELF_GLASS);
register(r, new BlockElfGlass(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).sound(SoundType.GLASS).lightValue(15).notSolid()), LibBlockNames.ELF_GLASS);
register(r, new BlockBrewery(Block.Properties.create(Material.ROCK).hardnessAndResistance(2, 10).sound(SoundType.STONE)), LibBlockNames.BREWERY);
register(r, new BlockModGlass(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).sound(SoundType.GLASS).lightValue(15).nonOpaque()), LibBlockNames.MANA_GLASS);
register(r, new BlockModGlass(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).sound(SoundType.GLASS).lightValue(15).notSolid()), LibBlockNames.MANA_GLASS);
register(r, new BlockTerraPlate(Block.Properties.create(Material.IRON).hardnessAndResistance(3, 10).sound(SoundType.METAL)), LibBlockNames.TERRA_PLATE);
builder = Block.Properties.create(Material.ROCK).hardnessAndResistance(2, 10).sound(SoundType.STONE);
@@ -513,7 +513,7 @@ public final class ModBlocks {
register(r, new BlockPetalBlock(color, builder), color.getName() + LibBlockNames.PETAL_BLOCK_SUFFIX);
}
register(r, new BlockCorporeaIndex(Block.Properties.create(Material.IRON).hardnessAndResistance(5.5F).sound(SoundType.METAL).nonOpaque()), LibBlockNames.CORPOREA_INDEX);
register(r, new BlockCorporeaIndex(Block.Properties.create(Material.IRON).hardnessAndResistance(5.5F).sound(SoundType.METAL).notSolid()), LibBlockNames.CORPOREA_INDEX);
register(r, new BlockCorporeaFunnel(Block.Properties.create(Material.IRON).hardnessAndResistance(5.5F).sound(SoundType.METAL)), LibBlockNames.CORPOREA_FUNNEL);
builder = Block.Properties.create(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0).sound(SoundType.PLANT).lightValue(3);
@@ -550,7 +550,7 @@ public final class ModBlocks {
register(r, new BlockManaBomb(Block.Properties.create(Material.WOOD).hardnessAndResistance(12).sound(SoundType.WOOD)), LibBlockNames.MANA_BOMB);
register(r, new BlockCacophonium(Block.Properties.create(Material.WOOD).hardnessAndResistance(0.8F)), LibBlockNames.CACOPHONIUM);
register(r, new BlockBellows(Block.Properties.create(Material.WOOD).hardnessAndResistance(2).sound(SoundType.WOOD)), LibBlockNames.BELLOWS);
register(r, new BlockBifrostPerm(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).lightValue(15).sound(SoundType.GLASS).nonOpaque()), LibBlockNames.BIFROST_PERM);
register(r, new BlockBifrostPerm(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).lightValue(15).sound(SoundType.GLASS).notSolid()), LibBlockNames.BIFROST_PERM);
register(r, new BlockCell(Block.Properties.create(Material.GOURD).sound(SoundType.CLOTH)), LibBlockNames.CELL_BLOCK);
register(r, new BlockGaiaHeadWall(Block.Properties.create(Material.MISCELLANEOUS).hardnessAndResistance(1)), LibBlockNames.GAIA_WALL_HEAD);
register(r, new BlockGaiaHead(Block.Properties.create(Material.MISCELLANEOUS).hardnessAndResistance(1)), LibBlockNames.GAIA_HEAD);
@@ -565,7 +565,7 @@ public final class ModBlocks {
register(r, new BlockAltGrass(v, builder), v.name().toLowerCase(Locale.ROOT) + LibBlockNames.ALT_GRASS_SUFFIX);
}
register(r, new BlockAnimatedTorch(Block.Properties.create(Material.MISCELLANEOUS).lightValue(7).nonOpaque()), LibBlockNames.ANIMATED_TORCH);
register(r, new BlockAnimatedTorch(Block.Properties.create(Material.MISCELLANEOUS).lightValue(7).notSolid()), LibBlockNames.ANIMATED_TORCH);
}
@SubscribeEvent
@@ -54,7 +54,7 @@ public class BlockCorporeaCrystalCube extends BlockCorporeaBase implements IWand
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack stack = player.getHeldItem(hand);
if (!stack.isEmpty()) {
if (stack.getItem() == ModItems.twigWand && player.isSneaking()) {
@@ -38,7 +38,7 @@ public class BlockCorporeaInterceptor extends BlockCorporeaBase {
}
@Override
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
public void tick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
world.setBlockState(pos, state.with(BlockStateProperties.POWERED, false));
}
@@ -78,7 +78,7 @@ public class BlockFloatingFlower extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
ItemStack stack = player.getHeldItem(hand);
TileEntity te = world.getTileEntity(pos);
if (!stack.isEmpty() && te != null && te.getCapability(TileEntitySpecialFlower.FLOATING_FLOWER_CAP).isPresent()) {
@@ -52,7 +52,7 @@ public class BlockManaFlame extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (Botania.gardenOfGlassLoaded) {
ItemStack stack = player.getHeldItem(hand);
if (!stack.isEmpty() && ItemTags.SAPLINGS.contains(stack.getItem()) && !player.inventory.hasItemStack(new ItemStack(ModItems.lexicon))) {
@@ -51,7 +51,7 @@ public class BlockModMushroom extends MushroomBlock implements IHornHarvestable,
}
@Override
public void scheduledTick(@Nonnull BlockState state, @Nonnull ServerWorld world, @Nonnull BlockPos pos, Random rand) {} // Prevent spreading
public void tick(@Nonnull BlockState state, @Nonnull ServerWorld world, @Nonnull BlockPos pos, Random rand) {} // Prevent spreading
// [VanillaCopy] super, without light level requirement
@Override
@@ -70,7 +70,7 @@ public class BlockTinyPotato extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileTinyPotato) {
((TileTinyPotato) tile).interact(player, hand, player.getHeldItem(hand), hit.getFace());
@@ -58,7 +58,7 @@ public class BlockBellows extends BlockMod {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (EntityDoppleganger.isTruePlayer(player)) {
((TileBellows) world.getTileEntity(pos)).interact();
}
@@ -57,7 +57,7 @@ public class BlockBrewery extends BlockMod implements IWandHUD {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileBrewery brew = (TileBrewery) world.getTileEntity(pos);
if (player.isSneaking()) {
@@ -61,7 +61,7 @@ public class BlockEnchanter extends BlockMod implements IWandable, IWandHUD {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileEnchanter enchanter = (TileEnchanter) world.getTileEntity(pos);
ItemStack stack = player.getHeldItem(hand);
if (!stack.isEmpty() && stack.getItem() == ModItems.twigWand) {
@@ -59,7 +59,7 @@ public class BlockPrism extends BlockMod implements IManaTrigger, IManaCollision
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileEntity tile = world.getTileEntity(pos);
if (!(tile instanceof TilePrism)) {
return ActionResultType.PASS;
@@ -51,7 +51,7 @@ public class BlockRuneAltar extends BlockMod implements IWandable {
}
@Override
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (world.isRemote) {
return ActionResultType.SUCCESS;
}
Loaded 100 of 232 files, more files were not shown because too many files have changed in this diff. Show more