mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
WIP 1.15
This commit is contained in:
1 parent
2291ef09c8
commit
d82f1ca8cb
151 files changed
+1075
-1059
No files matched your search
@@ -11,7 +11,7 @@
|
||||
package vazkii.botania.api.boss;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.ServerBossInfo;
|
||||
import net.minecraft.world.server.ServerBossInfo;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import vazkii.botania.api.internal.ShaderCallback;
|
||||
|
||||
@@ -24,6 +24,7 @@ import net.minecraft.network.play.server.SUpdateTileEntityPacket;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -237,7 +238,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickableTile
|
||||
/**
|
||||
* Called when a player right clicks this sub tile.
|
||||
*/
|
||||
public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { return false; }
|
||||
public ActionResultType onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { return ActionResultType.PASS; }
|
||||
|
||||
/**
|
||||
* Called when this sub tile is added to the world.
|
||||
|
||||
@@ -53,7 +53,7 @@ public final class BossBarHandler {
|
||||
Rectangle bgRect = currentBoss.getBossBarTextureRect();
|
||||
Rectangle fgRect = currentBoss.getBossBarHPTextureRect();
|
||||
String name = evt.getBossInfo().getName().getFormattedText();
|
||||
int c = Minecraft.getInstance().mainWindow.getScaledWidth() / 2;
|
||||
int c = Minecraft.getInstance().getWindow().getScaledWidth() / 2;
|
||||
int x = evt.getX();
|
||||
int y = evt.getY();
|
||||
int xf = x + (bgRect.width - fgRect.width) / 2;
|
||||
|
||||
@@ -257,8 +257,8 @@ public final class HUDHandler {
|
||||
int color = 0x00CC00 + (alpha << 24);
|
||||
String disp = I18n.format(ItemTwigWand.getModeString(stack));
|
||||
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(disp) / 2;
|
||||
int y = mc.mainWindow.getScaledHeight() - 70;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(disp) / 2;
|
||||
int y = mc.getWindow().getScaledHeight() - 70;
|
||||
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
@@ -271,8 +271,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.mainWindow.getScaledWidth() / 2 - width / 2;
|
||||
int y = mc.mainWindow.getScaledHeight() - ConfigHandler.CLIENT.manaBarHeight.get();
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - width / 2;
|
||||
int y = mc.getWindow().getScaledHeight() - ConfigHandler.CLIENT.manaBarHeight.get();
|
||||
|
||||
if(!hasCreative) {
|
||||
if(totalMaxMana == 0)
|
||||
@@ -304,8 +304,8 @@ public final class HUDHandler {
|
||||
profiler.startSection("poolRecipe");
|
||||
RecipeManaInfusion recipe = TilePool.getMatchingRecipe(stack, tile.getWorld().getBlockState(tile.getPos().down()));
|
||||
if(recipe != null) {
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - 11;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 + 10;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - 11;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 + 10;
|
||||
|
||||
int u = tile.getCurrentMana() >= recipe.getManaToConsume() ? 0 : 22;
|
||||
int v = mc.player.getName().getString().equals("haighyorkie") && mc.player.isSneaking() ? 23 : 8;
|
||||
@@ -339,8 +339,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.mainWindow.getScaledWidth();
|
||||
int h = mc.mainWindow.getScaledHeight();
|
||||
int w = mc.getWindow().getScaledWidth();
|
||||
int h = mc.getWindow().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);
|
||||
@@ -365,8 +365,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.mainWindow.getScaledWidth() - l - 20;
|
||||
int y = mc.mainWindow.getScaledHeight() - 60;
|
||||
int x = mc.getWindow().getScaledWidth() - l - 20;
|
||||
int y = mc.getWindow().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);
|
||||
@@ -384,19 +384,19 @@ public final class HUDHandler {
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(name) / 2;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 + 10;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(name) / 2;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 + 10;
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(name, x, y, color);
|
||||
|
||||
x = mc.mainWindow.getScaledWidth() / 2 - 51;
|
||||
x = mc.getWindow().getScaledWidth() / 2 - 51;
|
||||
y += 10;
|
||||
|
||||
renderManaBar(x, y, color, mana < 0 ? 0.5F : 1F, mana, maxMana);
|
||||
|
||||
if(mana < 0) {
|
||||
String text = I18n.format("botaniamisc.statusUnknown");
|
||||
x = mc.mainWindow.getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(text) / 2;
|
||||
x = mc.getWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(text) / 2;
|
||||
y -= 1;
|
||||
mc.fontRenderer.drawString(text, x, y, color);
|
||||
}
|
||||
@@ -409,8 +409,8 @@ public final class HUDHandler {
|
||||
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 + 55;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 + 12;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 + 55;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 + 12;
|
||||
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
|
||||
@@ -36,8 +36,8 @@ public final class ItemsRemainingRenderHandler {
|
||||
if(ticks > 0 && !stack.isEmpty()) {
|
||||
int pos = maxTicks - ticks;
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 + 10 + Math.max(0, pos - leaveTicks);
|
||||
int y = mc.mainWindow.getScaledHeight() / 2;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 + 10 + Math.max(0, pos - leaveTicks);
|
||||
int y = mc.getWindow().getScaledHeight() / 2;
|
||||
|
||||
int start = maxTicks - leaveTicks;
|
||||
float alpha = ticks + partTicks > start ? 1F : (ticks + partTicks) / start;
|
||||
|
||||
@@ -53,9 +53,9 @@ public class LightningHandler {
|
||||
Entity entity = Minecraft.getInstance().player;
|
||||
TextureManager render = Minecraft.getInstance().textureManager;
|
||||
|
||||
double interpPosX = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * frame;
|
||||
double interpPosY = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * frame;
|
||||
double interpPosZ = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * frame;
|
||||
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;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translated(-interpPosX, -interpPosY, -interpPosZ);
|
||||
|
||||
@@ -19,11 +19,7 @@ import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.client.model.BasicState;
|
||||
import net.minecraftforge.client.model.ForgeBlockStateV1;
|
||||
import net.minecraftforge.client.model.ModelDynBucket;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import vazkii.botania.client.model.FloatingFlowerModel;
|
||||
import vazkii.botania.client.model.GunModel;
|
||||
@@ -140,7 +136,7 @@ public class MiscellaneousIcons {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTextureStitchPre(TextureStitchEvent.Pre evt) {
|
||||
if(evt.getMap() != Minecraft.getInstance().getTextureMap())
|
||||
if(!evt.getMap().getId().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE))
|
||||
return;
|
||||
|
||||
evt.addSprite(prefix("blocks/alfheim_portal_swirl"));
|
||||
@@ -202,7 +198,7 @@ public class MiscellaneousIcons {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTextureStitchPost(TextureStitchEvent.Post evt) {
|
||||
if(evt.getMap() != Minecraft.getInstance().getTextureMap())
|
||||
if(!evt.getMap().getId().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE))
|
||||
return;
|
||||
|
||||
alfPortalTex = get(evt.getMap(), "blocks/alfheim_portal_swirl");
|
||||
|
||||
@@ -20,6 +20,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.ModList;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
import vazkii.botania.api.internal.ShaderCallback;
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
@@ -57,7 +58,7 @@ public final class ShaderHelper {
|
||||
|
||||
private static void deleteProgram(int id) {
|
||||
if (id != 0) {
|
||||
GLX.glDeleteProgram(id);
|
||||
GlStateManager.deleteProgram(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,11 +120,11 @@ public final class ShaderHelper {
|
||||
|
||||
lighting = GL11.glGetBoolean(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableLighting();
|
||||
GLX.glUseProgram(shader);
|
||||
GlStateManager.useProgram(shader);
|
||||
|
||||
if(shader != 0) {
|
||||
int time = GLX.glGetUniformLocation(shader, "time");
|
||||
GLX.glUniform1i(time, ClientTickHandler.ticksInGame);
|
||||
int time = GlStateManager.getUniformLocation(shader, "time");
|
||||
GlStateManager.uniform1(time, ClientTickHandler.ticksInGame);
|
||||
|
||||
if(callback != null)
|
||||
callback.call(shader);
|
||||
@@ -157,29 +158,29 @@ public final class ShaderHelper {
|
||||
private static int createProgram(IResourceManager manager, String vert, String frag) {
|
||||
int vertId = 0, fragId = 0, program;
|
||||
if(vert != null)
|
||||
vertId = createShader(manager, vert, GLX.GL_VERTEX_SHADER);
|
||||
vertId = createShader(manager, vert, GL20.GL_VERTEX_SHADER);
|
||||
if(frag != null)
|
||||
fragId = createShader(manager, frag, GLX.GL_FRAGMENT_SHADER);
|
||||
fragId = createShader(manager, frag, GL20.GL_FRAGMENT_SHADER);
|
||||
|
||||
program = GLX.glCreateProgram();
|
||||
program = GlStateManager.createProgram();
|
||||
if(program == 0)
|
||||
return 0;
|
||||
|
||||
if(vert != null)
|
||||
GLX.glAttachShader(program, vertId);
|
||||
GlStateManager.attachShader(program, vertId);
|
||||
if(frag != null)
|
||||
GLX.glAttachShader(program, fragId);
|
||||
GlStateManager.attachShader(program, fragId);
|
||||
|
||||
GLX.glLinkProgram(program);
|
||||
if (GLX.glGetProgrami(program, GLX.GL_LINK_STATUS) == GL11.GL_FALSE) {
|
||||
GlStateManager.linkProgram(program);
|
||||
if (GlStateManager.getProgram(program, GL20.GL_LINK_STATUS) == GL11.GL_FALSE) {
|
||||
Botania.LOGGER.warn("Error encountered when linking program containing VS {} and FS {}. Log output:", vert, frag);
|
||||
Botania.LOGGER.warn(GLX.glGetProgramInfoLog(program, 32768));
|
||||
Botania.LOGGER.warn(GlStateManager.getProgramInfoLog(program, 32768));
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Free the shader immediately, it will stay alive until the program is deleted
|
||||
GLX.glDeleteShader(vertId);
|
||||
GLX.glDeleteShader(fragId);
|
||||
GlStateManager.deleteShader(vertId);
|
||||
GlStateManager.deleteShader(fragId);
|
||||
|
||||
return program;
|
||||
}
|
||||
@@ -187,22 +188,22 @@ public final class ShaderHelper {
|
||||
private static int createShader(IResourceManager manager, String filename, int shaderType){
|
||||
int shader = 0;
|
||||
try {
|
||||
shader = GLX.glCreateShader(shaderType);
|
||||
shader = GlStateManager.createShader(shaderType);
|
||||
|
||||
if(shader == 0)
|
||||
return 0;
|
||||
|
||||
GLX.glShaderSource(shader, readFileAsString(manager, filename));
|
||||
GLX.glCompileShader(shader);
|
||||
GlStateManager.shaderSource(shader, readFileAsString(manager, filename));
|
||||
GlStateManager.compileShader(shader);
|
||||
|
||||
if (GLX.glGetShaderi(shader, GLX.GL_COMPILE_STATUS) == GL11.GL_FALSE) {
|
||||
String s1 = StringUtils.trim(GLX.glGetShaderInfoLog(shader, 32768));
|
||||
if (GlStateManager.getShader(shader, GL20.GL_COMPILE_STATUS) == GL11.GL_FALSE) {
|
||||
String s1 = StringUtils.trim(GlStateManager.getShaderInfoLog(shader, 32768));
|
||||
throw new IOException("Couldn't compile " + filename + ": " + s1);
|
||||
}
|
||||
|
||||
return shader;
|
||||
} catch(Exception e) {
|
||||
GLX.glDeleteShader(shader);
|
||||
GlStateManager.deleteShader(shader);
|
||||
e.printStackTrace();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ public class FXLightning extends Particle {
|
||||
|
||||
private static Vector3 getRelativeViewVector(Vector3 pos) {
|
||||
Entity renderEntity = Minecraft.getInstance().getRenderViewEntity();
|
||||
return new Vector3((float) renderEntity.posX - pos.x, (float) renderEntity.posY + renderEntity.getEyeHeight() - pos.y, (float) renderEntity.posZ - pos.z);
|
||||
return new Vector3((float) renderEntity.getX() - pos.x, (float) renderEntity.getY() + renderEntity.getEyeHeight() - pos.y, (float) renderEntity.getZ() - pos.z);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -91,9 +91,9 @@ public class FXWisp extends Particle {
|
||||
// [VanillaCopy] of super, without drag when onGround is true
|
||||
@Override
|
||||
public void tick() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
this.prevPosX = this.getX();
|
||||
this.prevPosY = this.getY();
|
||||
this.prevPosZ = this.getZ();
|
||||
|
||||
if (this.age++ >= this.maxAge)
|
||||
{
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.ISprite;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
@@ -22,15 +25,12 @@ import net.minecraftforge.client.model.data.EmptyModelData;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import vazkii.botania.api.BotaniaAPIClient;
|
||||
import vazkii.botania.api.item.IFloatingFlower;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import javax.vecmath.Vector3f;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
@@ -74,12 +74,12 @@ public class FloatingFlowerModel implements IUnbakedModel {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Collection<ResourceLocation> getTextures(@Nonnull Function<ResourceLocation, IUnbakedModel> modelGetter, @Nonnull Set<String> missingTextureErrors) {
|
||||
Set<ResourceLocation> ret = new HashSet<>();
|
||||
public Collection<Material> getTextureDependencies(Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors){
|
||||
Set<Material> ret = new HashSet<>();
|
||||
for (IUnbakedModel island : unbakedIslands.values()) {
|
||||
ret.addAll(island.getTextures(modelGetter, missingTextureErrors));
|
||||
ret.addAll(island.getTextureDependencies(modelGetter, missingTextureErrors));
|
||||
}
|
||||
ret.addAll(unbakedFlower.getTextures(modelGetter, missingTextureErrors));
|
||||
ret.addAll(unbakedFlower.getTextureDependencies(modelGetter, missingTextureErrors));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -158,10 +158,10 @@ public class FloatingFlowerModel implements IUnbakedModel {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(@Nonnull ItemCameraTransforms.TransformType cameraTransformType) {
|
||||
public IBakedModel handlePerspective(@Nonnull ItemCameraTransforms.TransformType cameraTransformType, MatrixStack ms) {
|
||||
// Use the item transforms from the islands since it looks better
|
||||
Pair<? extends IBakedModel, Matrix4f> p = this.islands.values().iterator().next().handlePerspective(cameraTransformType);
|
||||
return Pair.of(this, p.getRight());
|
||||
this.islands.values().iterator().next().handlePerspective(cameraTransformType, ms);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.TransformationMatrix;
|
||||
import net.minecraft.client.renderer.Vector3f;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.BlockModel;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
@@ -14,20 +18,22 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.resources.IResource;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.BasicState;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.client.model.SimpleModelTransform;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.item.ItemManaGun;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import javax.vecmath.Vector3f;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
@@ -35,6 +41,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import static vazkii.botania.common.lib.ResourceLocationHelper.prefix;
|
||||
|
||||
public class GunModel implements IBakedModel {
|
||||
private static final ModelResourceLocation DESU = new ModelResourceLocation(LibMisc.MOD_ID + ":desu_gun", "inventory");
|
||||
private static final ModelResourceLocation DESU_CLIP = new ModelResourceLocation(LibMisc.MOD_ID + ":desu_gun_clip", "inventory");
|
||||
@@ -62,8 +70,15 @@ public class GunModel implements IBakedModel {
|
||||
ItemStack lens = ItemManaGun.getLens(stack);
|
||||
if(!lens.isEmpty()) {
|
||||
// TODO 1.14 : currently broken because it goes through the vanilla codepath which doesn't handle builtin/generated models
|
||||
ModelResourceLocation mrl = new ModelResourceLocation(lens.getItem().getRegistryName(), "inventory");
|
||||
IUnbakedModel unbaked = ModelLoaderRegistry.getModelOrMissing(mrl);
|
||||
// todo 1.15 : check above statement lol
|
||||
ResourceLocation loc = new ResourceLocation(lens.getItem().getRegistryName().getNamespace(), "models/item/" + lens.getItem().getRegistryName().getPath() + ".json");
|
||||
IUnbakedModel unbaked;
|
||||
try (IResource json = Minecraft.getInstance().getResourceManager().getResource(loc)) {
|
||||
unbaked = BlockModel.deserialize(new InputStreamReader(json.getInputStream()));
|
||||
} catch (IOException e) {
|
||||
Botania.LOGGER.error("Missing flower model {}", loc);
|
||||
unbaked = BlockModel.deserialize(ModelBakery.MISSING_MODEL_MESH);
|
||||
}
|
||||
return GunModel.this.getModel(unbaked, clip);
|
||||
}
|
||||
else return clip ? originalModelClip : originalModel;
|
||||
@@ -98,8 +113,8 @@ public class GunModel implements IBakedModel {
|
||||
CompositeBakedModel(ModelBakery bakery, IUnbakedModel lensUnbaked, IBakedModel gun) {
|
||||
this.gun = gun;
|
||||
|
||||
final TRSRTransformation transform = new TRSRTransformation(new Vector3f(-0.2F, 0.4F, 0.8F), TRSRTransformation.quatFromXYZ(0, (float) Math.PI / 2, 0), new Vector3f(0.625F, 0.625F, 0.625F), null);
|
||||
IBakedModel lens = lensUnbaked.bake(bakery, ModelLoader.defaultTextureGetter(), new BasicState(transform, false), DefaultVertexFormats.ITEM);
|
||||
final TransformationMatrix transform = new TransformationMatrix(new Vector3f(-0.2F, 0.4F, 0.8F), Vector3f.POSITIVE_Y.getDegreesQuaternion((float) Math.PI / 2), new Vector3f(0.625F, 0.625F, 0.625F), null);
|
||||
IBakedModel lens = lensUnbaked.bake(bakery, ModelLoader.defaultTextureGetter(), new SimpleModelTransform(transform), prefix("gun_lens_" + lensUnbaked.toString()));
|
||||
|
||||
for(Direction e : Direction.values())
|
||||
faceQuads.put(e, new ArrayList<>());
|
||||
@@ -132,11 +147,10 @@ public class GunModel implements IBakedModel {
|
||||
@Nonnull @Override public ItemOverrideList getOverrides() { return ItemOverrideList.EMPTY; }
|
||||
|
||||
@Override
|
||||
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(@Nonnull ItemCameraTransforms.TransformType cameraTransformType) {
|
||||
Pair<? extends IBakedModel, Matrix4f> pair = gun.handlePerspective(cameraTransformType);
|
||||
if(pair != null && pair.getRight() != null)
|
||||
return Pair.of(this, pair.getRight());
|
||||
return Pair.of(this, TRSRTransformation.identity().getMatrixVec());
|
||||
public IBakedModel handlePerspective(@Nonnull ItemCameraTransforms.TransformType cameraTransformType, MatrixStack stack) {
|
||||
// apply gun transforms to stack but use self model still
|
||||
gun.handlePerspective(cameraTransformType, stack);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
@@ -12,7 +13,6 @@ import org.apache.commons.lang3.tuple.Pair;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -25,12 +25,12 @@ public class LexiconModel implements IBakedModel {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) {
|
||||
public IBakedModel handlePerspective(ItemCameraTransforms.TransformType cameraTransformType, MatrixStack stack) {
|
||||
if((cameraTransformType == ItemCameraTransforms.TransformType.FIRST_PERSON_RIGHT_HAND
|
||||
|| cameraTransformType == ItemCameraTransforms.TransformType.FIRST_PERSON_LEFT_HAND)
|
||||
&& ConfigHandler.CLIENT.lexicon3dModel.get())
|
||||
return Pair.of(this, null);
|
||||
return original.handlePerspective(cameraTransformType);
|
||||
return this;
|
||||
return original.handlePerspective(cameraTransformType, stack);
|
||||
}
|
||||
|
||||
@Nonnull @Override public List<BakedQuad> getQuads(BlockState state, Direction side, @Nonnull Random rand) { return ImmutableList.of(); }
|
||||
|
||||
@@ -10,43 +10,43 @@
|
||||
*/
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
public class ModelAvatar extends Model {
|
||||
|
||||
public final RendererModel body;
|
||||
public final RendererModel rightarm;
|
||||
public final RendererModel leftarm;
|
||||
public final RendererModel rightleg;
|
||||
public final RendererModel leftleg;
|
||||
public final RendererModel head;
|
||||
public final ModelRenderer body;
|
||||
public final ModelRenderer rightarm;
|
||||
public final ModelRenderer leftarm;
|
||||
public final ModelRenderer rightleg;
|
||||
public final ModelRenderer leftleg;
|
||||
public final ModelRenderer head;
|
||||
|
||||
public ModelAvatar() {
|
||||
textureWidth = 32;
|
||||
textureHeight = 32;
|
||||
leftleg = new RendererModel(this, 0, 20);
|
||||
leftleg = new ModelRenderer(this, 0, 20);
|
||||
leftleg.mirror = true;
|
||||
leftleg.setRotationPoint(1.5F, 18.0F, -0.5F);
|
||||
leftleg.addBox(-1.5F, 0.0F, -1.5F, 3, 6, 3, 0.0F);
|
||||
rightarm = new RendererModel(this, 0, 20);
|
||||
leftleg.addCuboid(-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.addBox(-2.0F, -1.0F, -1.0F, 2, 6, 3, 0.0F);
|
||||
rightarm.addCuboid(-2.0F, -1.0F, -1.0F, 2, 6, 3, 0.0F);
|
||||
setRotateAngle(rightarm, 0.0F, -0.0F, 0.08726646259971647F);
|
||||
leftarm = new RendererModel(this, 0, 20);
|
||||
leftarm = new ModelRenderer(this, 0, 20);
|
||||
leftarm.mirror = true;
|
||||
leftarm.setRotationPoint(3.0F, 15.0F, -1.0F);
|
||||
leftarm.addBox(0.0F, -1.0F, -1.0F, 2, 6, 3, 0.0F);
|
||||
leftarm.addCuboid(0.0F, -1.0F, -1.0F, 2, 6, 3, 0.0F);
|
||||
setRotateAngle(leftarm, 0.0F, -0.0F, -0.08726646259971647F);
|
||||
head = new RendererModel(this, 0, 0);
|
||||
head = new ModelRenderer(this, 0, 0);
|
||||
head.setRotationPoint(0.0F, 14.0F, 0.0F);
|
||||
head.addBox(-3.0F, -6.0F, -3.0F, 6, 6, 6, 0.0F);
|
||||
rightleg = new RendererModel(this, 0, 20);
|
||||
head.addCuboid(-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.addBox(-1.5F, 0.0F, -1.5F, 3, 6, 3, 0.0F);
|
||||
body = new RendererModel(this, 0, 12);
|
||||
rightleg.addCuboid(-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.addBox(-3.0F, 0.0F, -2.0F, 6, 4, 4, 0.0F);
|
||||
body.addCuboid(-3.0F, 0.0F, -2.0F, 6, 4, 4, 0.0F);
|
||||
}
|
||||
|
||||
public void render() {
|
||||
@@ -59,7 +59,7 @@ public class ModelAvatar extends Model {
|
||||
body.render(f5);
|
||||
}
|
||||
|
||||
public void setRotateAngle(RendererModel modelRenderer, float x, float y, float z) {
|
||||
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
|
||||
@@ -11,33 +11,33 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
public class ModelBellows extends Model {
|
||||
|
||||
final RendererModel top;
|
||||
final RendererModel base;
|
||||
final RendererModel pipe;
|
||||
final RendererModel funnel;
|
||||
final ModelRenderer top;
|
||||
final ModelRenderer base;
|
||||
final ModelRenderer pipe;
|
||||
final ModelRenderer funnel;
|
||||
|
||||
public ModelBellows() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
top = new RendererModel(this, 0, 0);
|
||||
top = new ModelRenderer(this, 0, 0);
|
||||
top.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
top.addBox(-4.0F, -2.0F, -4.0F, 8, 1, 8, 0.0F);
|
||||
base = new RendererModel(this, 0, 9);
|
||||
top.addCuboid(-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.addBox(-5.0F, 6.0F, -5.0F, 10, 2, 10, 0.0F);
|
||||
pipe = new RendererModel(this, 0, 21);
|
||||
base.addCuboid(-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.addBox(-1.0F, 6.0F, -8.0F, 2, 2, 3, 0.0F);
|
||||
pipe.addCuboid(-1.0F, 6.0F, -8.0F, 2, 2, 3, 0.0F);
|
||||
|
||||
funnel = new RendererModel(this, 40, 0);
|
||||
funnel = new ModelRenderer(this, 40, 0);
|
||||
funnel.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
funnel.addBox(0.0F, 0.0F, 0.0F, 6, 7, 6, 0.0F);
|
||||
funnel.addCuboid(0.0F, 0.0F, 0.0F, 6, 7, 6, 0.0F);
|
||||
}
|
||||
|
||||
public void render(float fract) {
|
||||
|
||||
@@ -11,36 +11,36 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import vazkii.botania.client.render.tile.RenderTileBrewery;
|
||||
|
||||
public class ModelBrewery extends Model {
|
||||
|
||||
final RendererModel top;
|
||||
final RendererModel pole;
|
||||
final RendererModel bottom;
|
||||
final ModelRenderer top;
|
||||
final ModelRenderer pole;
|
||||
final ModelRenderer bottom;
|
||||
|
||||
final RendererModel plate;
|
||||
final ModelRenderer plate;
|
||||
|
||||
public ModelBrewery() {
|
||||
|
||||
textureWidth = 32;
|
||||
textureHeight = 16;
|
||||
|
||||
top = new RendererModel(this, 8, 0);
|
||||
top = new ModelRenderer(this, 8, 0);
|
||||
top.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
top.addBox(-2.0F, -7.0F, -2.0F, 4, 1, 4, 0.0F);
|
||||
pole = new RendererModel(this, 0, 0);
|
||||
top.addCuboid(-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.addBox(-1.0F, -6.0F, -1.0F, 2, 10, 2, 0.0F);
|
||||
bottom = new RendererModel(this, 8, 5);
|
||||
pole.addCuboid(-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.addBox(-2.0F, 4.0F, -2.0F, 4, 1, 4, 0.0F);
|
||||
bottom.addCuboid(-2.0F, 4.0F, -2.0F, 4, 1, 4, 0.0F);
|
||||
|
||||
plate = new RendererModel(this, 8, 5);
|
||||
plate = new ModelRenderer(this, 8, 5);
|
||||
plate.setRotationPoint(0.0F, 17.0F, 0.0F);
|
||||
plate.addBox(5.0F, 0.0F, -2.0F, 4, 1, 4, 0.0F);
|
||||
plate.addCuboid(5.0F, 0.0F, -2.0F, 4, 1, 4, 0.0F);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
/**
|
||||
* armor_cloak - wiiv
|
||||
@@ -9,9 +9,9 @@ import net.minecraft.client.renderer.model.Model;
|
||||
*/
|
||||
public class ModelCloak extends Model {
|
||||
|
||||
public RendererModel collar;
|
||||
public RendererModel sideL;
|
||||
public RendererModel sideR;
|
||||
public ModelRenderer collar;
|
||||
public ModelRenderer sideL;
|
||||
public ModelRenderer sideR;
|
||||
|
||||
public ModelCloak() {
|
||||
|
||||
@@ -19,18 +19,18 @@ public class ModelCloak extends Model {
|
||||
textureHeight = 64;
|
||||
float s = 0.01F;
|
||||
|
||||
collar = new RendererModel(this, 0, 0);
|
||||
collar = new ModelRenderer(this, 0, 0);
|
||||
collar.setRotationPoint(0.0F, -3.0F, -4.5F);
|
||||
collar.addBox(-5.5F, 0.0F, -1.5F, 11, 5, 11, s);
|
||||
collar.addCuboid(-5.5F, 0.0F, -1.5F, 11, 5, 11, s);
|
||||
setRotateAngle(collar, 0.08726646259971647F, 0.0F, 0.0F);
|
||||
sideL = new RendererModel(this, 0, 16);
|
||||
sideL = new ModelRenderer(this, 0, 16);
|
||||
sideL.mirror = true;
|
||||
sideL.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
sideL.addBox(-0.5F, -0.5F, -5.5F, 11, 21, 10, s);
|
||||
sideL.addCuboid(-0.5F, -0.5F, -5.5F, 11, 21, 10, s);
|
||||
setRotateAngle(sideL, 0.08726646259971647F, -0.08726646259971647F, -0.17453292519943295F);
|
||||
sideR = new RendererModel(this, 0, 16);
|
||||
sideR = new ModelRenderer(this, 0, 16);
|
||||
sideR.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
sideR.addBox(-10.5F, -0.5F, -5.5F, 11, 21, 10, s);
|
||||
sideR.addCuboid(-10.5F, -0.5F, -5.5F, 11, 21, 10, s);
|
||||
setRotateAngle(sideR, 0.08726646259971647F, 0.08726646259971647F, 0.17453292519943295F);
|
||||
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public class ModelCloak extends Model {
|
||||
sideR.render(f5);
|
||||
}
|
||||
|
||||
public void setRotateAngle(RendererModel modelRenderer, float x, float y, float z) {
|
||||
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
|
||||
@@ -11,50 +11,50 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class ModelHourglass extends Model {
|
||||
|
||||
public RendererModel top;
|
||||
public RendererModel glassT;
|
||||
public RendererModel ring;
|
||||
public RendererModel glassB;
|
||||
public RendererModel bottom;
|
||||
public ModelRenderer top;
|
||||
public ModelRenderer glassT;
|
||||
public ModelRenderer ring;
|
||||
public ModelRenderer glassB;
|
||||
public ModelRenderer bottom;
|
||||
|
||||
public RendererModel sandT;
|
||||
public RendererModel sandB;
|
||||
public ModelRenderer sandT;
|
||||
public ModelRenderer sandB;
|
||||
|
||||
public ModelHourglass() {
|
||||
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
top = new RendererModel(this, 20, 0);
|
||||
top = new ModelRenderer(this, 20, 0);
|
||||
top.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
top.addBox(-3.0F, -6.5F, -3.0F, 6, 1, 6, 0.0F);
|
||||
glassT = new RendererModel(this, 0, 0);
|
||||
top.addCuboid(-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.addBox(-2.5F, -5.5F, -2.5F, 5, 5, 5, 0.0F);
|
||||
ring = new RendererModel(this, 0, 20);
|
||||
glassT.addCuboid(-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.addBox(-1.5F, -0.5F, -1.5F, 3, 1, 3, 0.0F);
|
||||
glassB = new RendererModel(this, 0, 10);
|
||||
ring.addCuboid(-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.addBox(-2.5F, 0.5F, -2.5F, 5, 5, 5, 0.0F);
|
||||
bottom = new RendererModel(this, 20, 7);
|
||||
glassB.addCuboid(-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.addBox(-3.0F, 5.5F, -3.0F, 6, 1, 6, 0.0F);
|
||||
bottom.addCuboid(-3.0F, 5.5F, -3.0F, 6, 1, 6, 0.0F);
|
||||
|
||||
sandT = new RendererModel(this, 20, 14);
|
||||
sandT = new ModelRenderer(this, 20, 14);
|
||||
sandT.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
sandT.addBox(0.0F, 0.0F, 0.0F, 4, 4, 4, 0.0F); // -2.0F, -5.0F, -2.0F
|
||||
sandB = new RendererModel(this, 20, 14);
|
||||
sandT.addCuboid(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.addBox(0.0F, 0.0F, 0.0F, 4, 4, 4, 0.0F); // -2.0F, 1.0F, -2.05F
|
||||
sandB.addCuboid(0.0F, 0.0F, 0.0F, 4, 4, 4, 0.0F); // -2.0F, 1.0F, -2.05F
|
||||
}
|
||||
|
||||
public void render(float fract1, float fract2, boolean flip, int color) {
|
||||
|
||||
@@ -11,42 +11,42 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.EntityModel;
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import vazkii.botania.common.entity.EntityPixie;
|
||||
|
||||
public class ModelPixie extends EntityModel<EntityPixie> {
|
||||
|
||||
public RendererModel body;
|
||||
public RendererModel leftWingT;
|
||||
public RendererModel leftWingB;
|
||||
public RendererModel rightWingT;
|
||||
public RendererModel rightWingB;
|
||||
public ModelRenderer body;
|
||||
public ModelRenderer leftWingT;
|
||||
public ModelRenderer leftWingB;
|
||||
public ModelRenderer rightWingT;
|
||||
public ModelRenderer rightWingB;
|
||||
|
||||
public ModelPixie() {
|
||||
|
||||
textureWidth = 32;
|
||||
textureHeight = 32;
|
||||
|
||||
body = new RendererModel(this, 0, 0);
|
||||
body = new ModelRenderer(this, 0, 0);
|
||||
body.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
body.addBox(-2.5F, 0.0F, -2.5F, 5, 5, 5, 0.0F);
|
||||
body.addCuboid(-2.5F, 0.0F, -2.5F, 5, 5, 5, 0.0F);
|
||||
|
||||
leftWingT = new RendererModel(this, 0, 4);
|
||||
leftWingT = new ModelRenderer(this, 0, 4);
|
||||
leftWingT.setRotationPoint(2.5F, 18.0F, 0.5F);
|
||||
leftWingT.addBox(0.0F, -5.0F, 0.0F, 0, 5, 6, 0.0F);
|
||||
leftWingT.addCuboid(0.0F, -5.0F, 0.0F, 0, 5, 6, 0.0F);
|
||||
setRotateAngle(leftWingT, 0.2617993877991494F, 0.5235987755982988F, 0.2617993877991494F);
|
||||
leftWingB = new RendererModel(this, 0, 11);
|
||||
leftWingB = new ModelRenderer(this, 0, 11);
|
||||
leftWingB.setRotationPoint(2.5F, 18.0F, 0.5F);
|
||||
leftWingB.addBox(0.0F, 0.0F, 0.0F, 0, 3, 4, 0.0F);
|
||||
leftWingB.addCuboid(0.0F, 0.0F, 0.0F, 0, 3, 4, 0.0F);
|
||||
setRotateAngle(leftWingB, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
|
||||
rightWingT = new RendererModel(this, 0, 4);
|
||||
rightWingT = new ModelRenderer(this, 0, 4);
|
||||
rightWingT.setRotationPoint(-2.5F, 18.0F, 0.5F);
|
||||
rightWingT.addBox(0.0F, -5.0F, 0.0F, 0, 5, 6, 0.0F);
|
||||
rightWingT.addCuboid(0.0F, -5.0F, 0.0F, 0, 5, 6, 0.0F);
|
||||
setRotateAngle(rightWingT, 0.2617993877991494F, -0.5235987755982988F, -0.2617993877991494F);
|
||||
rightWingB = new RendererModel(this, 0, 11);
|
||||
rightWingB = new ModelRenderer(this, 0, 11);
|
||||
rightWingB.setRotationPoint(-2.5F, 18.0F, 0.5F);
|
||||
rightWingB.addBox(0.0F, 0.0F, 0.0F, 0, 3, 4, 0.0F);
|
||||
rightWingB.addCuboid(0.0F, 0.0F, 0.0F, 0, 3, 4, 0.0F);
|
||||
setRotateAngle(rightWingB, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ModelPixie extends EntityModel<EntityPixie> {
|
||||
public void render(EntityPixie entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
|
||||
setRotationAngles(entity, f, f1, f2, f3, f4, f5);
|
||||
setAngles(entity, f, f1, f2, f3, f4);
|
||||
|
||||
body.render(f5);
|
||||
|
||||
@@ -64,16 +64,14 @@ public class ModelPixie extends EntityModel<EntityPixie> {
|
||||
rightWingB.render(f5);
|
||||
}
|
||||
|
||||
public void setRotateAngle(RendererModel modelRenderer, float x, float y, float z) {
|
||||
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(EntityPixie entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.setRotationAngles(entity, f, f1, f2, f3, f4, f5);
|
||||
|
||||
public void setAngles(EntityPixie entity, float f, float f1, float f2, float f3, float f4) {
|
||||
rightWingT.rotateAngleY = -(MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.5F);
|
||||
leftWingT.rotateAngleY = MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.5F;
|
||||
rightWingB.rotateAngleY = -(MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.25F);
|
||||
|
||||
@@ -10,25 +10,25 @@
|
||||
*/
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
public class ModelPylonGaia extends Model implements IPylonModel {
|
||||
|
||||
private final RendererModel platef;
|
||||
private final RendererModel plateb;
|
||||
private final RendererModel platel;
|
||||
private final RendererModel plater;
|
||||
private final ModelRenderer platef;
|
||||
private final ModelRenderer plateb;
|
||||
private final ModelRenderer platel;
|
||||
private final ModelRenderer plater;
|
||||
|
||||
private final RendererModel shardlbt;
|
||||
private final RendererModel shardrbt;
|
||||
private final RendererModel shardlft;
|
||||
private final RendererModel shardrft;
|
||||
private final ModelRenderer shardlbt;
|
||||
private final ModelRenderer shardrbt;
|
||||
private final ModelRenderer shardlft;
|
||||
private final ModelRenderer shardrft;
|
||||
|
||||
private final RendererModel shardlbb;
|
||||
private final RendererModel shardrbb;
|
||||
private final RendererModel shardlfb;
|
||||
private final RendererModel shardrfb;
|
||||
private final ModelRenderer shardlbb;
|
||||
private final ModelRenderer shardrbb;
|
||||
private final ModelRenderer shardlfb;
|
||||
private final ModelRenderer shardrfb;
|
||||
|
||||
public ModelPylonGaia() {
|
||||
|
||||
@@ -36,48 +36,48 @@ public class ModelPylonGaia extends Model implements IPylonModel {
|
||||
textureHeight = 64;
|
||||
|
||||
//plates
|
||||
platel = new RendererModel(this, 36, 0);
|
||||
platel = new ModelRenderer(this, 36, 0);
|
||||
platel.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
platel.addBox(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
|
||||
platel.addCuboid(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
|
||||
setRotation(platel, 0.0F, 1.5707963267948966F, 0.0F);
|
||||
plater = new RendererModel(this, 36, 0);
|
||||
plater = new ModelRenderer(this, 36, 0);
|
||||
plater.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
plater.addBox(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
|
||||
plater.addCuboid(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
|
||||
setRotation(plater, 0.0F, -1.5707963267948966F, 0.0F);
|
||||
platef = new RendererModel(this, 36, 0);
|
||||
platef = new ModelRenderer(this, 36, 0);
|
||||
platef.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
platef.addBox(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
|
||||
plateb = new RendererModel(this, 36, 0);
|
||||
platef.addCuboid(-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.addBox(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
|
||||
plateb.addCuboid(-3.0F, -3.0F, -8.0F, 6, 6, 2, 0.0F);
|
||||
setRotation(plateb, 0.0F, 3.141592653589793F, 0.0F);
|
||||
|
||||
//shards
|
||||
shardrft = new RendererModel(this, 16, 32);
|
||||
shardrft = new ModelRenderer(this, 16, 32);
|
||||
shardrft.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shardrft.addBox(2.0F, -6.0F, -5.0F, 3, 2, 3, 0.0F);
|
||||
shardlbt = new RendererModel(this, 0, 0);
|
||||
shardrft.addCuboid(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.addBox(-5.0F, -6.0F, 0.0F, 6, 5, 5, 0.0F);
|
||||
shardrbt = new RendererModel(this, 22, 9);
|
||||
shardlbt.addCuboid(-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.addBox(3.0F, -5.0F, 0.0F, 2, 4, 5, 0.0F);
|
||||
shardlft = new RendererModel(this, 0, 32);
|
||||
shardrbt.addCuboid(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.addBox(-5.0F, -7.0F, -5.0F, 5, 6, 3, 0.0F);
|
||||
shardlft.addCuboid(-5.0F, -7.0F, -5.0F, 5, 6, 3, 0.0F);
|
||||
|
||||
shardrfb = new RendererModel(this, 16, 37);
|
||||
shardrfb = new ModelRenderer(this, 16, 37);
|
||||
shardrfb.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shardrfb.addBox(2.0F, -2.0F, -5.0F, 3, 6, 3, 0.0F);
|
||||
shardlbb = new RendererModel(this, 0, 10);
|
||||
shardrfb.addCuboid(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.addBox(-5.0F, 1.0F, 0.0F, 6, 3, 5, 0.0F);
|
||||
shardrbb = new RendererModel(this, 22, 0);
|
||||
shardlbb.addCuboid(-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.addBox(3.0F, 1.0F, 0.0F, 2, 4, 5, 0.0F);
|
||||
shardlfb = new RendererModel(this, 0, 41);
|
||||
shardrbb.addCuboid(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.addBox(-5.0F, 1.0F, -5.0F, 5, 2, 3, 0.0F);
|
||||
shardlfb.addCuboid(-5.0F, 1.0F, -5.0F, 5, 2, 3, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,7 +105,7 @@ public class ModelPylonGaia extends Model implements IPylonModel {
|
||||
plater.render(f);
|
||||
}
|
||||
|
||||
private void setRotation(RendererModel model, float x, float y, float z) {
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
*/
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
public class ModelPylonMana extends Model implements IPylonModel {
|
||||
|
||||
private final RendererModel platef;
|
||||
private final RendererModel plateb;
|
||||
private final RendererModel platel;
|
||||
private final RendererModel plater;
|
||||
private final ModelRenderer platef;
|
||||
private final ModelRenderer plateb;
|
||||
private final ModelRenderer platel;
|
||||
private final ModelRenderer plater;
|
||||
|
||||
private final RendererModel shardlf;
|
||||
private final RendererModel shardrf;
|
||||
private final RendererModel shardlb;
|
||||
private final RendererModel shardrb;
|
||||
private final ModelRenderer shardlf;
|
||||
private final ModelRenderer shardrf;
|
||||
private final ModelRenderer shardlb;
|
||||
private final ModelRenderer shardrb;
|
||||
|
||||
public ModelPylonMana() {
|
||||
|
||||
@@ -31,35 +31,35 @@ public class ModelPylonMana extends Model implements IPylonModel {
|
||||
textureHeight = 64;
|
||||
|
||||
//plates
|
||||
platef = new RendererModel(this, 36, 0);
|
||||
platef = new ModelRenderer(this, 36, 0);
|
||||
platef.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
platef.addBox(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
|
||||
plateb = new RendererModel(this, 36, 0);
|
||||
platef.addCuboid(-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.addBox(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
|
||||
plateb.addCuboid(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
|
||||
setRotation(plateb, 0.0F, 3.141592653589793F, 0.0F);
|
||||
platel = new RendererModel(this, 36, 0);
|
||||
platel = new ModelRenderer(this, 36, 0);
|
||||
platel.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
platel.addBox(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
|
||||
platel.addCuboid(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
|
||||
setRotation(platel, 0.0F, 1.5707963267948966F, 0.0F);
|
||||
plater = new RendererModel(this, 36, 0);
|
||||
plater = new ModelRenderer(this, 36, 0);
|
||||
plater.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
plater.addBox(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
|
||||
plater.addCuboid(-3.0F, -4.0F, -8.0F, 6, 8, 2, 0.0F);
|
||||
setRotation(plater, 0.0F, -1.5707963267948966F, 0.0F);
|
||||
|
||||
//shards
|
||||
shardlf = new RendererModel(this, 0, 21);
|
||||
shardlf = new ModelRenderer(this, 0, 21);
|
||||
shardlf.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shardlf.addBox(-5.0F, -9.0F, -5.0F, 5, 16, 3, 0.0F);
|
||||
shardrf = new RendererModel(this, 16, 21);
|
||||
shardlf.addCuboid(-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.addBox(2.0F, -12.0F, -5.0F, 3, 16, 3, 0.0F);
|
||||
shardlb = new RendererModel(this, 0, 0);
|
||||
shardrf.addCuboid(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.addBox(-5.0F, -10.0F, 0.0F, 6, 16, 5, 0.0F);
|
||||
shardrb = new RendererModel(this, 22, 0);
|
||||
shardlb.addCuboid(-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.addBox(3.0F, -11.0F, 0.0F, 2, 16, 5, 0.0F);
|
||||
shardrb.addCuboid(3.0F, -11.0F, 0.0F, 2, 16, 5, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,7 +82,7 @@ public class ModelPylonMana extends Model implements IPylonModel {
|
||||
plater.render(f);
|
||||
}
|
||||
|
||||
private void setRotation(RendererModel model, float x, float y, float z) {
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
|
||||
@@ -10,25 +10,25 @@
|
||||
*/
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
public class ModelPylonNatura extends Model implements IPylonModel {
|
||||
|
||||
private final RendererModel platef;
|
||||
private final RendererModel plateb;
|
||||
private final RendererModel platel;
|
||||
private final RendererModel plater;
|
||||
private final ModelRenderer platef;
|
||||
private final ModelRenderer plateb;
|
||||
private final ModelRenderer platel;
|
||||
private final ModelRenderer plater;
|
||||
|
||||
private final RendererModel shardlbt;
|
||||
private final RendererModel shardrbt;
|
||||
private final RendererModel shardlft;
|
||||
private final RendererModel shardrft;
|
||||
private final ModelRenderer shardlbt;
|
||||
private final ModelRenderer shardrbt;
|
||||
private final ModelRenderer shardlft;
|
||||
private final ModelRenderer shardrft;
|
||||
|
||||
private final RendererModel shardlbb;
|
||||
private final RendererModel shardrbb;
|
||||
private final RendererModel shardlfb;
|
||||
private final RendererModel shardrfb;
|
||||
private final ModelRenderer shardlbb;
|
||||
private final ModelRenderer shardrbb;
|
||||
private final ModelRenderer shardlfb;
|
||||
private final ModelRenderer shardrfb;
|
||||
|
||||
public ModelPylonNatura() {
|
||||
|
||||
@@ -36,48 +36,48 @@ public class ModelPylonNatura extends Model implements IPylonModel {
|
||||
textureHeight = 64;
|
||||
|
||||
//plates
|
||||
platef = new RendererModel(this, 36, 0);
|
||||
platef = new ModelRenderer(this, 36, 0);
|
||||
platef.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
platef.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
|
||||
plateb = new RendererModel(this, 36, 0);
|
||||
platef.addCuboid(-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.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
|
||||
plateb.addCuboid(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
|
||||
setRotation(plateb, 0.0F, 3.141592653589793F, 0.0F);
|
||||
platel = new RendererModel(this, 36, 0);
|
||||
platel = new ModelRenderer(this, 36, 0);
|
||||
platel.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
platel.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
|
||||
platel.addCuboid(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
|
||||
setRotation(platel, 0.0F, 1.5707963267948966F, 0.0F);
|
||||
plater = new RendererModel(this, 36, 0);
|
||||
plater = new ModelRenderer(this, 36, 0);
|
||||
plater.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
plater.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
|
||||
plater.addCuboid(-4.0F, -4.0F, -8.0F, 8, 8, 2, 0.0F);
|
||||
setRotation(plater, 0.0F, -1.5707963267948966F, 0.0F);
|
||||
|
||||
//shards
|
||||
shardrft = new RendererModel(this, 16, 32);
|
||||
shardrft = new ModelRenderer(this, 16, 32);
|
||||
shardrft.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shardrft.addBox(2.0F, -13.0F, -5.0F, 3, 7, 3, 0.0F);
|
||||
shardlbt = new RendererModel(this, 0, 0);
|
||||
shardrft.addCuboid(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.addBox(-5.0F, -11.0F, 0.0F, 6, 9, 5, 0.0F);
|
||||
shardrbt = new RendererModel(this, 22, 0);
|
||||
shardlbt.addCuboid(-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.addBox(3.0F, -12.0F, 0.0F, 2, 8, 5, 0.0F);
|
||||
shardlft = new RendererModel(this, 0, 32);
|
||||
shardrbt.addCuboid(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.addBox(-5.0F, -10.0F, -5.0F, 5, 10, 3, 0.0F);
|
||||
shardlft.addCuboid(-5.0F, -10.0F, -5.0F, 5, 10, 3, 0.0F);
|
||||
|
||||
shardrfb = new RendererModel(this, 16, 42);
|
||||
shardrfb = new ModelRenderer(this, 16, 42);
|
||||
shardrfb.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shardrfb.addBox(2.0F, -4.0F, -5.0F, 3, 9, 3, 0.0F);
|
||||
shardlbb = new RendererModel(this, 0, 14);
|
||||
shardrfb.addCuboid(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.addBox(-5.0F, 0.0F, 0.0F, 6, 7, 5, 0.0F);
|
||||
shardrbb = new RendererModel(this, 22, 13);
|
||||
shardlbb.addCuboid(-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.addBox(3.0F, -2.0F, 0.0F, 2, 8, 5, 0.0F);
|
||||
shardlfb = new RendererModel(this, 0, 45);
|
||||
shardrbb.addCuboid(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.addBox(-5.0F, 2.0F, -5.0F, 5, 6, 3, 0.0F);
|
||||
shardlfb.addCuboid(-5.0F, 2.0F, -5.0F, 5, 6, 3, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,7 +105,7 @@ public class ModelPylonNatura extends Model implements IPylonModel {
|
||||
plater.render(f);
|
||||
}
|
||||
|
||||
private void setRotation(RendererModel model, float x, float y, float z) {
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
|
||||
@@ -12,18 +12,18 @@ package vazkii.botania.client.model;
|
||||
|
||||
import com.mojang.blaze3d.platform.GLX;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
|
||||
public class ModelSpinningCubes extends Model {
|
||||
|
||||
private final RendererModel spinningCube;
|
||||
private final ModelRenderer spinningCube;
|
||||
|
||||
public ModelSpinningCubes() {
|
||||
spinningCube = new RendererModel(this, 42, 0);
|
||||
spinningCube.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
spinningCube = new ModelRenderer(this, 42, 0);
|
||||
spinningCube.addCuboid(0F, 0F, 0F, 1, 1, 1);
|
||||
spinningCube.setRotationPoint(0F, 0F, 0F);
|
||||
spinningCube.setTextureSize(64, 64);
|
||||
}
|
||||
|
||||
@@ -10,61 +10,61 @@
|
||||
*/
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
public class ModelSpreader extends Model {
|
||||
|
||||
final RendererModel top;
|
||||
final RendererModel sideL;
|
||||
final RendererModel sideR;
|
||||
final RendererModel bottom;
|
||||
final RendererModel back;
|
||||
final ModelRenderer top;
|
||||
final ModelRenderer sideL;
|
||||
final ModelRenderer sideR;
|
||||
final ModelRenderer bottom;
|
||||
final ModelRenderer back;
|
||||
|
||||
final RendererModel holeT;
|
||||
final RendererModel holeL;
|
||||
final RendererModel holeR;
|
||||
final RendererModel holeB;
|
||||
final ModelRenderer holeT;
|
||||
final ModelRenderer holeL;
|
||||
final ModelRenderer holeR;
|
||||
final ModelRenderer holeB;
|
||||
|
||||
final RendererModel inside;
|
||||
final ModelRenderer inside;
|
||||
|
||||
public ModelSpreader() {
|
||||
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
top = new RendererModel(this, 0, 0);
|
||||
top = new ModelRenderer(this, 0, 0);
|
||||
top.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
top.addBox(-7.0F, -7.0F, -7.0F, 14, 1, 14, 0.0F);
|
||||
sideL = new RendererModel(this, 0, 30);
|
||||
top.addCuboid(-7.0F, -7.0F, -7.0F, 14, 1, 14, 0.0F);
|
||||
sideL = new ModelRenderer(this, 0, 30);
|
||||
sideL.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
sideL.addBox(6.0F, -6.0F, -6.0F, 1, 12, 12, 0.0F);
|
||||
sideR = new RendererModel(this, 0, 30);
|
||||
sideL.addCuboid(6.0F, -6.0F, -6.0F, 1, 12, 12, 0.0F);
|
||||
sideR = new ModelRenderer(this, 0, 30);
|
||||
sideR.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
sideR.addBox(-7.0F, -6.0F, -6.0F, 1, 12, 12, 0.0F);
|
||||
back = new RendererModel(this, 0, 29);
|
||||
sideR.addCuboid(-7.0F, -6.0F, -6.0F, 1, 12, 12, 0.0F);
|
||||
back = new ModelRenderer(this, 0, 29);
|
||||
back.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
back.addBox(-7.0F, -6.0F, -7.0F, 14, 12, 1, 0.0F);
|
||||
bottom = new RendererModel(this, 0, 15);
|
||||
back.addCuboid(-7.0F, -6.0F, -7.0F, 14, 12, 1, 0.0F);
|
||||
bottom = new ModelRenderer(this, 0, 15);
|
||||
bottom.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
bottom.addBox(-7.0F, 6.0F, -7.0F, 14, 1, 14, 0.0F);
|
||||
bottom.addCuboid(-7.0F, 6.0F, -7.0F, 14, 1, 14, 0.0F);
|
||||
|
||||
holeT = new RendererModel(this, 0, 54);
|
||||
holeT = new ModelRenderer(this, 0, 54);
|
||||
holeT.setRotationPoint(0.0F, 10.0F, 6.0F);
|
||||
holeT.addBox(-7.0F, 0.0F, 0.0F, 14, 4, 1, 0.0F);
|
||||
holeL = new RendererModel(this, 30, 54);
|
||||
holeT.addCuboid(-7.0F, 0.0F, 0.0F, 14, 4, 1, 0.0F);
|
||||
holeL = new ModelRenderer(this, 30, 54);
|
||||
holeL.setRotationPoint(2.0F, 10.0F, 6.0F);
|
||||
holeL.addBox(0.0F, 4.0F, 0.0F, 5, 4, 1, 0.0F);
|
||||
holeR = new RendererModel(this, 30, 59);
|
||||
holeL.addCuboid(0.0F, 4.0F, 0.0F, 5, 4, 1, 0.0F);
|
||||
holeR = new ModelRenderer(this, 30, 59);
|
||||
holeR.setRotationPoint(0.0F, 10.0F, 6.0F);
|
||||
holeR.addBox(-7.0F, 4.0F, 0.0F, 5, 4, 1, 0.0F);
|
||||
holeB = new RendererModel(this, 0, 59);
|
||||
holeR.addCuboid(-7.0F, 4.0F, 0.0F, 5, 4, 1, 0.0F);
|
||||
holeB = new ModelRenderer(this, 0, 59);
|
||||
holeB.setRotationPoint(0.0F, 18.0F, 6.0F);
|
||||
holeB.addBox(-7.0F, 0.0F, 0.0F, 14, 4, 1, 0.0F);
|
||||
holeB.addCuboid(-7.0F, 0.0F, 0.0F, 14, 4, 1, 0.0F);
|
||||
|
||||
inside = new RendererModel(this, 30, 30);
|
||||
inside = new ModelRenderer(this, 30, 30);
|
||||
inside.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
inside.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6, 0.0F);
|
||||
inside.addCuboid(-3.0F, -3.0F, -3.0F, 6, 6, 6, 0.0F);
|
||||
}
|
||||
|
||||
public void render() {
|
||||
|
||||
@@ -11,33 +11,33 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
public class ModelTeruTeruBozu extends Model {
|
||||
|
||||
public final RendererModel thread;
|
||||
public final RendererModel cloth;
|
||||
public final RendererModel happyFace;
|
||||
public final RendererModel sadFace;
|
||||
public final ModelRenderer thread;
|
||||
public final ModelRenderer cloth;
|
||||
public final ModelRenderer happyFace;
|
||||
public final ModelRenderer sadFace;
|
||||
|
||||
public ModelTeruTeruBozu() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
sadFace = new RendererModel(this, 32, 0);
|
||||
sadFace = new ModelRenderer(this, 32, 0);
|
||||
sadFace.setRotationPoint(0.0F, 14.5F, 0.0F);
|
||||
sadFace.addBox(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
sadFace.addCuboid(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
setRotateAngle(sadFace, 0.17453292519943295F, 0.0F, 0.0F);
|
||||
happyFace = new RendererModel(this, 0, 0);
|
||||
happyFace = new ModelRenderer(this, 0, 0);
|
||||
happyFace.setRotationPoint(0.0F, 14.5F, 0.0F);
|
||||
happyFace.addBox(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
happyFace.addCuboid(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
setRotateAngle(happyFace, -0.17453292519943295F, 0.0F, 0.0F);
|
||||
thread = new RendererModel(this, 32, 16);
|
||||
thread = new ModelRenderer(this, 32, 16);
|
||||
thread.setRotationPoint(0.0F, 14.0F, 0.0F);
|
||||
thread.addBox(-3.0F, 2.0F, -3.0F, 6, 1, 6, 0.0F);
|
||||
cloth = new RendererModel(this, 0, 16);
|
||||
thread.addCuboid(-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.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
cloth.addCuboid(-4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
setRotateAngle(cloth, 0.7853981633974483F, 2.2689280275926285F, 1.5707963267948966F);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ModelTeruTeruBozu extends Model {
|
||||
cloth.render(f5);
|
||||
}
|
||||
|
||||
public void setRotateAngle(RendererModel modelRenderer, float x, float y, float z) {
|
||||
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
|
||||
@@ -10,19 +10,19 @@
|
||||
*/
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.Model;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
|
||||
public class ModelTinyPotato extends Model {
|
||||
|
||||
final RendererModel potato;
|
||||
final ModelRenderer potato;
|
||||
|
||||
public ModelTinyPotato() {
|
||||
textureWidth = 16;
|
||||
textureHeight = 16;
|
||||
|
||||
potato = new RendererModel(this, 0, 0);
|
||||
potato.addBox(0F, 0F, 0F, 4, 6, 4);
|
||||
potato = new ModelRenderer(this, 0, 0);
|
||||
potato.addCuboid(0F, 0F, 0F, 4, 6, 4);
|
||||
potato.setRotationPoint(-2F, 18F, -2F);
|
||||
potato.setTextureSize(64, 32);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package vazkii.botania.client.model.armor;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.BipedModel;
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.item.ArmorStandEntity;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
@@ -15,10 +15,11 @@ 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
|
||||
// todo 1.15 recheck param names
|
||||
@Override
|
||||
public void setRotationAngles(LivingEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
public void setAngles(LivingEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
|
||||
if (!(entity instanceof ArmorStandEntity)) {
|
||||
super.setRotationAngles(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
|
||||
super.setAngles(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -47,7 +48,7 @@ public class ModelArmor extends BipedModel {
|
||||
this.bipedHeadwear.copyModelAngles(this.bipedHead);
|
||||
}
|
||||
|
||||
protected void setRotateAngle(RendererModel modelRenderer, float x, float y, float z) {
|
||||
protected void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
*/
|
||||
package vazkii.botania.client.model.armor;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
@@ -19,41 +21,41 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class ModelArmorElementium extends ModelArmor {
|
||||
|
||||
private final RendererModel helmAnchor;
|
||||
private final RendererModel helm;
|
||||
private final RendererModel helmFairy;
|
||||
private final RendererModel helmWing1r;
|
||||
private final RendererModel helmWing2l;
|
||||
private final RendererModel helmWing1l;
|
||||
private final RendererModel helmWing2r;
|
||||
private final ModelRenderer helmAnchor;
|
||||
private final ModelRenderer helm;
|
||||
private final ModelRenderer helmFairy;
|
||||
private final ModelRenderer helmWing1r;
|
||||
private final ModelRenderer helmWing2l;
|
||||
private final ModelRenderer helmWing1l;
|
||||
private final ModelRenderer helmWing2r;
|
||||
|
||||
private final RendererModel bodyAnchor;
|
||||
private final RendererModel bodyTop;
|
||||
private final RendererModel bodyBottom;
|
||||
private final ModelRenderer bodyAnchor;
|
||||
private final ModelRenderer bodyTop;
|
||||
private final ModelRenderer bodyBottom;
|
||||
|
||||
private final RendererModel armLAnchor;
|
||||
private final RendererModel armL;
|
||||
private final RendererModel armLpauldron;
|
||||
private final RendererModel armLwing1;
|
||||
private final RendererModel armLwing2;
|
||||
private final ModelRenderer armLAnchor;
|
||||
private final ModelRenderer armL;
|
||||
private final ModelRenderer armLpauldron;
|
||||
private final ModelRenderer armLwing1;
|
||||
private final ModelRenderer armLwing2;
|
||||
|
||||
private final RendererModel armRAnchor;
|
||||
private final RendererModel armR;
|
||||
private final RendererModel armRpauldron;
|
||||
private final RendererModel armRwing1;
|
||||
private final RendererModel armRwing2;
|
||||
private final ModelRenderer armRAnchor;
|
||||
private final ModelRenderer armR;
|
||||
private final ModelRenderer armRpauldron;
|
||||
private final ModelRenderer armRwing1;
|
||||
private final ModelRenderer armRwing2;
|
||||
|
||||
private final RendererModel pantsAnchor;
|
||||
private final RendererModel belt;
|
||||
private final RendererModel legL;
|
||||
private final RendererModel legR;
|
||||
private final ModelRenderer pantsAnchor;
|
||||
private final ModelRenderer belt;
|
||||
private final ModelRenderer legL;
|
||||
private final ModelRenderer legR;
|
||||
|
||||
private final RendererModel bootL;
|
||||
private final RendererModel bootLwing1;
|
||||
private final RendererModel bootLwing2;
|
||||
private final RendererModel bootR;
|
||||
private final RendererModel bootRwing1;
|
||||
private final RendererModel bootRwing2;
|
||||
private final ModelRenderer bootL;
|
||||
private final ModelRenderer bootLwing1;
|
||||
private final ModelRenderer bootLwing2;
|
||||
private final ModelRenderer bootR;
|
||||
private final ModelRenderer bootRwing1;
|
||||
private final ModelRenderer bootRwing2;
|
||||
|
||||
public ModelArmorElementium(EquipmentSlotType slot) {
|
||||
super(slot);
|
||||
@@ -63,130 +65,130 @@ public class ModelArmorElementium extends ModelArmor {
|
||||
float s = 0.01F;
|
||||
|
||||
//helm
|
||||
this.helmAnchor = new RendererModel(this, 0, 0);
|
||||
this.helmAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.helmAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.helmAnchor.addBox(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
|
||||
this.helm = new RendererModel(this, 0, 0);
|
||||
this.helmAnchor.addCuboid(-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.addBox(-4.5F, -9.0F, -4.5F, 9, 9, 9, s);
|
||||
this.helmFairy = new RendererModel(this, 36, 11);
|
||||
this.helm.addCuboid(-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.addBox(-2.5F, -10.0F, -5.5F, 5, 5, 5, s);
|
||||
this.helmWing1l = new RendererModel(this, 36, 0);
|
||||
this.helmFairy.addCuboid(-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.addBox(-1.0F, -5.0F, 0.0F, 1, 5, 6, s);
|
||||
this.helmWing1l.addCuboid(-1.0F, -5.0F, 0.0F, 1, 5, 6, s);
|
||||
this.setRotateAngle(helmWing1l, 0.2617993877991494F, 0.5235987755982988F, 0.2617993877991494F);
|
||||
this.helmWing2l = new RendererModel(this, 50, 0);
|
||||
this.helmWing2l = new ModelRenderer(this, 50, 0);
|
||||
this.helmWing2l.setRotationPoint(4.5F, -6.0F, -0.5F);
|
||||
this.helmWing2l.addBox(-1.0F, 0.0F, 0.0F, 1, 3, 4, s);
|
||||
this.helmWing2l.addCuboid(-1.0F, 0.0F, 0.0F, 1, 3, 4, s);
|
||||
this.setRotateAngle(helmWing2l, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
|
||||
this.helmWing1r = new RendererModel(this, 36, 0);
|
||||
this.helmWing1r = new ModelRenderer(this, 36, 0);
|
||||
this.helmWing1r.setRotationPoint(-4.5F, -6.0F, -0.5F);
|
||||
this.helmWing1r.addBox(0.0F, -5.0F, 0.0F, 1, 5, 6, s);
|
||||
this.helmWing1r.addCuboid(0.0F, -5.0F, 0.0F, 1, 5, 6, s);
|
||||
this.setRotateAngle(helmWing1r, 0.2617993877991494F, -0.5235987755982988F, -0.2617993877991494F);
|
||||
this.helmWing2r = new RendererModel(this, 50, 0);
|
||||
this.helmWing2r = new ModelRenderer(this, 50, 0);
|
||||
this.helmWing2r.mirror = true;
|
||||
this.helmWing2r.setRotationPoint(-4.5F, -6.0F, -0.5F);
|
||||
this.helmWing2r.addBox(0.0F, 0.0F, 0.0F, 1, 3, 4, s);
|
||||
this.helmWing2r.addCuboid(0.0F, 0.0F, 0.0F, 1, 3, 4, s);
|
||||
this.setRotateAngle(helmWing2r, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
|
||||
|
||||
//body
|
||||
this.bodyAnchor = new RendererModel(this, 0, 0);
|
||||
this.bodyAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.bodyAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.bodyAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
|
||||
this.bodyTop = new RendererModel(this, 0, 19);
|
||||
this.bodyAnchor.addCuboid(-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.addBox(-4.5F, 0.0F, -3.0F, 9, 6, 6, s);
|
||||
this.bodyBottom = new RendererModel(this, 0, 31);
|
||||
this.bodyTop.addCuboid(-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.addBox(-3.5F, 5.0F, -2.5F, 7, 3, 5, s);
|
||||
this.bodyBottom.addCuboid(-3.5F, 5.0F, -2.5F, 7, 3, 5, s);
|
||||
|
||||
//armL
|
||||
this.armLAnchor = new RendererModel(this, 0, 0);
|
||||
this.armLAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.armLAnchor.mirror = true;
|
||||
this.armLAnchor.setRotationPoint(4.0F, 2.0F, 0.0F);
|
||||
this.armLAnchor.addBox(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
|
||||
this.armL = new RendererModel(this, 24, 40);
|
||||
this.armLAnchor.addCuboid(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.addBox(0.5F, 4.5F, -2.49F, 3, 6, 5, s);
|
||||
this.armLpauldron = new RendererModel(this, 0, 40);
|
||||
this.armL.addCuboid(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.addBox(-0.5F, -3.0F, -3.0F, 6, 7, 6, s);
|
||||
this.armLwing1 = new RendererModel(this, 40, 35);
|
||||
this.armLpauldron.addCuboid(-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.addBox(0.0F, -4.0F, 0.0F, 0, 4, 5, s);
|
||||
this.armLwing1.addCuboid(0.0F, -4.0F, 0.0F, 0, 4, 5, s);
|
||||
this.setRotateAngle(armLwing1, 0.2617993877991494F, 0.5235987755982988F, 0.2617993877991494F);
|
||||
this.armLwing2 = new RendererModel(this, 40, 40);
|
||||
this.armLwing2 = new ModelRenderer(this, 40, 40);
|
||||
this.armLwing2.setRotationPoint(6.0F, -1.0F, 0.0F);
|
||||
this.armLwing2.addBox(0.0F, 0.0F, 0.0F, 0, 3, 4, s);
|
||||
this.armLwing2.addCuboid(0.0F, 0.0F, 0.0F, 0, 3, 4, s);
|
||||
this.setRotateAngle(armLwing2, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
|
||||
|
||||
//armR
|
||||
this.armRAnchor = new RendererModel(this, 0, 0);
|
||||
this.armRAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.armRAnchor.mirror = true;
|
||||
this.armRAnchor.setRotationPoint(-4.0F, 2.0F, 0.0F);
|
||||
this.armRAnchor.addBox(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
|
||||
this.armR = new RendererModel(this, 24, 40);
|
||||
this.armRAnchor.addCuboid(-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.addBox(-3.5F, 4.5F, -2.51F, 3, 6, 5, s);
|
||||
this.armRpauldron = new RendererModel(this, 0, 40);
|
||||
this.armR.addCuboid(-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.addBox(-5.5F, -3.0F, -3.0F, 6, 7, 6, s);
|
||||
this.armRpauldron.addCuboid(-5.5F, -3.0F, -3.0F, 6, 7, 6, s);
|
||||
this.setRotateAngle(armRpauldron, 0.0F, 0.0F, 0.0017453292519943296F);
|
||||
this.armRwing1 = new RendererModel(this, 40, 35);
|
||||
this.armRwing1 = new ModelRenderer(this, 40, 35);
|
||||
this.armRwing1.mirror = true;
|
||||
this.armRwing1.setRotationPoint(-6.5F, -1.0F, 0.0F);
|
||||
this.armRwing1.addBox(0.0F, -4.0F, 0.0F, 0, 4, 5, s);
|
||||
this.armRwing1.addCuboid(0.0F, -4.0F, 0.0F, 0, 4, 5, s);
|
||||
this.setRotateAngle(armRwing1, 0.2617993877991494F, -0.5235987755982988F, -0.2617993877991494F);
|
||||
this.armRwing2 = new RendererModel(this, 40, 40);
|
||||
this.armRwing2 = new ModelRenderer(this, 40, 40);
|
||||
this.armRwing2.mirror = true;
|
||||
this.armRwing2.setRotationPoint(-6.5F, -1.0F, 0.0F);
|
||||
this.armRwing2.addBox(0.0F, 0.0F, 0.0F, 0, 3, 4, s);
|
||||
this.armRwing2.addCuboid(0.0F, 0.0F, 0.0F, 0, 3, 4, s);
|
||||
this.setRotateAngle(armRwing2, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
|
||||
|
||||
//pants
|
||||
this.pantsAnchor = new RendererModel(this, 0, 0);
|
||||
this.pantsAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.pantsAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.pantsAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
|
||||
this.belt = new RendererModel(this, 0, 53);
|
||||
this.pantsAnchor.addCuboid(-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.addBox(-4.5F, 8.0F, -3.0F, 9, 5, 6, s);
|
||||
this.legL = new RendererModel(this, 0, 64);
|
||||
this.belt.addCuboid(-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.addBox(-2.39F, 0.0F, -2.49F, 5, 6, 5, s);
|
||||
this.legR = new RendererModel(this, 0, 64);
|
||||
this.legL.addCuboid(-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.addBox(-2.61F, 0.0F, -2.51F, 5, 6, 5, s);
|
||||
this.legR.addCuboid(-2.61F, 0.0F, -2.51F, 5, 6, 5, s);
|
||||
|
||||
//boots
|
||||
this.bootL = new RendererModel(this, 0, 75);
|
||||
this.bootL = new ModelRenderer(this, 0, 75);
|
||||
this.bootL.mirror = true;
|
||||
this.bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.bootL.addBox(-2.39F, 8.5F, -2.49F, 5, 5, 5, s);
|
||||
this.bootLwing1 = new RendererModel(this, 40, 40);
|
||||
this.bootL.addCuboid(-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.addBox(0.0F, -3.0F, 0.0F, 0, 3, 4, s);
|
||||
this.bootLwing1.addCuboid(0.0F, -3.0F, 0.0F, 0, 3, 4, s);
|
||||
this.setRotateAngle(bootLwing1, 0.2617993877991494F, 0.5235987755982988F, 0.2617993877991494F);
|
||||
this.bootLwing2 = new RendererModel(this, 40, 44);
|
||||
this.bootLwing2 = new ModelRenderer(this, 40, 44);
|
||||
this.bootLwing2.setRotationPoint(2.5F, 8.5F, 0.0F);
|
||||
this.bootLwing2.addBox(0.0F, 0.0F, 0.0F, 0, 2, 3, s);
|
||||
this.bootLwing2.addCuboid(0.0F, 0.0F, 0.0F, 0, 2, 3, s);
|
||||
this.setRotateAngle(bootLwing2, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
|
||||
this.bootR = new RendererModel(this, 0, 75);
|
||||
this.bootR = new ModelRenderer(this, 0, 75);
|
||||
this.bootR.setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
this.bootR.addBox(-2.61F, 8.5F, -2.51F, 5, 5, 5, s);
|
||||
this.bootRwing1 = new RendererModel(this, 40, 40);
|
||||
this.bootR.addCuboid(-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.addBox(0.0F, -3.0F, 0.0F, 0, 3, 4, s);
|
||||
this.bootRwing1.addCuboid(0.0F, -3.0F, 0.0F, 0, 3, 4, s);
|
||||
this.setRotateAngle(bootRwing1, 0.2617993877991494F, -0.5235987755982988F, -0.2617993877991494F);
|
||||
this.bootRwing2 = new RendererModel(this, 40, 44);
|
||||
this.bootRwing2 = new ModelRenderer(this, 40, 44);
|
||||
this.bootRwing2.mirror = true;
|
||||
this.bootRwing2.setRotationPoint(-2.5F, 8.5F, 0.0F);
|
||||
this.bootRwing2.addBox(0.0F, 0.0F, 0.0F, 0, 2, 3, s);
|
||||
this.bootRwing2.addCuboid(0.0F, 0.0F, 0.0F, 0, 2, 3, s);
|
||||
this.setRotateAngle(bootRwing2, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
|
||||
|
||||
//hierarchy
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
*/
|
||||
package vazkii.botania.client.model.armor;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
@@ -19,33 +21,33 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class ModelArmorManasteel extends ModelArmor {
|
||||
|
||||
private final RendererModel helmAnchor;
|
||||
private final RendererModel helm;
|
||||
private final RendererModel helmTop;
|
||||
private final RendererModel helmCrystal;
|
||||
private final ModelRenderer helmAnchor;
|
||||
private final ModelRenderer helm;
|
||||
private final ModelRenderer helmTop;
|
||||
private final ModelRenderer helmCrystal;
|
||||
|
||||
private final RendererModel bodyAnchor;
|
||||
private final RendererModel bodyTop;
|
||||
private final RendererModel bodyBottom;
|
||||
private final ModelRenderer bodyAnchor;
|
||||
private final ModelRenderer bodyTop;
|
||||
private final ModelRenderer bodyBottom;
|
||||
|
||||
private final RendererModel armLAnchor;
|
||||
private final RendererModel armL;
|
||||
private final RendererModel armLpauldron;
|
||||
private final RendererModel armLcrystal;
|
||||
private final ModelRenderer armLAnchor;
|
||||
private final ModelRenderer armL;
|
||||
private final ModelRenderer armLpauldron;
|
||||
private final ModelRenderer armLcrystal;
|
||||
|
||||
private final RendererModel armRAnchor;
|
||||
private final RendererModel armR;
|
||||
private final RendererModel armRpauldron;
|
||||
private final RendererModel armRcrystal;
|
||||
private final RendererModel pantsAnchor;
|
||||
private final RendererModel belt;
|
||||
private final RendererModel legL;
|
||||
private final RendererModel legR;
|
||||
private final ModelRenderer armRAnchor;
|
||||
private final ModelRenderer armR;
|
||||
private final ModelRenderer armRpauldron;
|
||||
private final ModelRenderer armRcrystal;
|
||||
private final ModelRenderer pantsAnchor;
|
||||
private final ModelRenderer belt;
|
||||
private final ModelRenderer legL;
|
||||
private final ModelRenderer legR;
|
||||
|
||||
private final RendererModel bootL;
|
||||
private final RendererModel bootLcrystal;
|
||||
private final RendererModel bootR;
|
||||
private final RendererModel bootRcrystal;
|
||||
private final ModelRenderer bootL;
|
||||
private final ModelRenderer bootLcrystal;
|
||||
private final ModelRenderer bootR;
|
||||
private final ModelRenderer bootRcrystal;
|
||||
|
||||
public ModelArmorManasteel(EquipmentSlotType slot) {
|
||||
super(slot);
|
||||
@@ -55,99 +57,99 @@ public class ModelArmorManasteel extends ModelArmor {
|
||||
float s = 0.01F;
|
||||
|
||||
//helm
|
||||
this.helmAnchor = new RendererModel(this, 0, 0);
|
||||
this.helmAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.helmAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.helmAnchor.addBox(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
|
||||
this.helm = new RendererModel(this, 0, 0);
|
||||
this.helmAnchor.addCuboid(-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.addBox(-4.5F, -8.5F, -4.5F, 9, 9, 9, s);
|
||||
this.helmTop = new RendererModel(this, 36, 6);
|
||||
this.helm.addCuboid(-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.addBox(-1.5F, 0.0F, -7.0F, 3, 3, 7, s);
|
||||
this.helmTop.addCuboid(-1.5F, 0.0F, -7.0F, 3, 3, 7, s);
|
||||
this.setRotateAngle(helmTop, -0.2617993877991494F, 0.0F, 0.0F);
|
||||
this.helmCrystal = new RendererModel(this, 36, 0);
|
||||
this.helmCrystal = new ModelRenderer(this, 36, 0);
|
||||
this.helmCrystal.setRotationPoint(0.0F, -7.5F, -4.5F);
|
||||
this.helmCrystal.addBox(-1.5F, -4.0F, -1.0F, 3, 5, 1, s);
|
||||
this.helmCrystal.addCuboid(-1.5F, -4.0F, -1.0F, 3, 5, 1, s);
|
||||
this.setRotateAngle(helmCrystal, 0.08726646259971647F, 0.0F, 0.0F);
|
||||
|
||||
//body
|
||||
this.bodyAnchor = new RendererModel(this, 0, 0);
|
||||
this.bodyAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.bodyAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.bodyAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
|
||||
this.bodyTop = new RendererModel(this, 0, 18);
|
||||
this.bodyAnchor.addCuboid(-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.addBox(-4.5F, -0.5F, -3.0F, 9, 6, 6, s);
|
||||
this.bodyTop.addCuboid(-4.5F, -0.5F, -3.0F, 9, 6, 6, s);
|
||||
this.setRotateAngle(bodyTop, 0.0F, 0.0F, 0.0F);
|
||||
this.bodyBottom = new RendererModel(this, 0, 30);
|
||||
this.bodyBottom = new ModelRenderer(this, 0, 30);
|
||||
this.bodyBottom.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.bodyBottom.addBox(-2.5F, 5.5F, -2.5F, 5, 3, 5, 0.0F);
|
||||
this.bodyBottom.addCuboid(-2.5F, 5.5F, -2.5F, 5, 3, 5, 0.0F);
|
||||
|
||||
//armL
|
||||
this.armLAnchor = new RendererModel(this, 0, 0);
|
||||
this.armLAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.armLAnchor.mirror = true;
|
||||
this.armLAnchor.setRotationPoint(4.0F, 2.0F, 0.0F);
|
||||
this.armLAnchor.addBox(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
|
||||
this.armL = new RendererModel(this, 22, 40);
|
||||
this.armLAnchor.addCuboid(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.addBox(1.5F, 2.0F, -2.49F, 2, 6, 5, s);
|
||||
this.armLpauldron = new RendererModel(this, 0, 40);
|
||||
this.armL.addCuboid(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.addBox(-0.5F, -3.0F, -3.0F, 5, 4, 6, s);
|
||||
this.armLcrystal = new RendererModel(this, 36, 40);
|
||||
this.armLpauldron.addCuboid(-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.addBox(-0.5F, -2.5F, -1.5F, 2, 3, 3, s);
|
||||
this.armLcrystal.addCuboid(-0.5F, -2.5F, -1.5F, 2, 3, 3, s);
|
||||
this.setRotateAngle(armLcrystal, 0.0F, 0.0F, -0.08726646259971647F);
|
||||
|
||||
//armR
|
||||
this.armRAnchor = new RendererModel(this, 0, 0);
|
||||
this.armRAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.armRAnchor.mirror = true;
|
||||
this.armRAnchor.setRotationPoint(-4.0F, 2.0F, 0.0F);
|
||||
this.armRAnchor.addBox(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
|
||||
this.armR = new RendererModel(this, 22, 40);
|
||||
this.armRAnchor.addCuboid(-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.addBox(-3.5F, 2.0F, -2.51F, 2, 6, 5, s);
|
||||
this.armRpauldron = new RendererModel(this, 0, 40);
|
||||
this.armR.addCuboid(-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.addBox(-4.5F, -3.0F, -3.0F, 5, 4, 6, s);
|
||||
this.armRcrystal = new RendererModel(this, 36, 40);
|
||||
this.armRpauldron.addCuboid(-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.addBox(-1.5F, -2.5F, -1.5F, 2, 3, 3, s);
|
||||
this.armRcrystal.addCuboid(-1.5F, -2.5F, -1.5F, 2, 3, 3, s);
|
||||
this.setRotateAngle(armRcrystal, 0.0F, 0.0F, 0.08726646259971647F);
|
||||
|
||||
//pants
|
||||
this.pantsAnchor = new RendererModel(this, 0, 0);
|
||||
this.pantsAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.pantsAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.pantsAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
|
||||
this.belt = new RendererModel(this, 0, 51);
|
||||
this.pantsAnchor.addCuboid(-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.addBox(-4.5F, 9.0F, -3.0F, 9, 3, 6, s);
|
||||
this.legL = new RendererModel(this, 0, 60);
|
||||
this.belt.addCuboid(-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.addBox(-0.39F, 0.0F, -2.49F, 3, 6, 5, s);
|
||||
this.legR = new RendererModel(this, 0, 60);
|
||||
this.legL.addCuboid(-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.addBox(-2.61F, 0.0F, -2.51F, 3, 6, 5, s);
|
||||
this.legR.addCuboid(-2.61F, 0.0F, -2.51F, 3, 6, 5, s);
|
||||
|
||||
//boots
|
||||
this.bootL = new RendererModel(this, 0, 71);
|
||||
this.bootL = new ModelRenderer(this, 0, 71);
|
||||
this.bootL.mirror = true;
|
||||
this.bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.bootL.addBox(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
|
||||
this.bootLcrystal = new RendererModel(this, 36, 46);
|
||||
this.bootL.addCuboid(-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.addBox(-1.0F, -2.0F, -1.5F, 2, 3, 3, s);
|
||||
this.bootLcrystal.addCuboid(-1.0F, -2.0F, -1.5F, 2, 3, 3, s);
|
||||
this.setRotateAngle(bootLcrystal, 0.0F, 0.0F, 0.08726646259971647F);
|
||||
this.bootR = new RendererModel(this, 0, 71);
|
||||
this.bootR = new ModelRenderer(this, 0, 71);
|
||||
this.bootR.setRotationPoint(-2.0F, 12.0F, 0.0F);
|
||||
this.bootR.addBox(-2.5F, 8.5F, -2.51F, 5, 4, 5, s);
|
||||
this.bootRcrystal = new RendererModel(this, 36, 46);
|
||||
this.bootR.addCuboid(-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.addBox(-1.0F, -2.0F, -1.5F, 2, 3, 3, s);
|
||||
this.bootRcrystal.addCuboid(-1.0F, -2.0F, -1.5F, 2, 3, 3, s);
|
||||
this.setRotateAngle(bootRcrystal, 0.0F, 0.0F, -0.08726646259971647F);
|
||||
|
||||
//hierarchy
|
||||
@@ -173,7 +175,7 @@ public class ModelArmorManasteel extends ModelArmor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(@Nonnull LivingEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
|
||||
public void render(@Nonnull LivingEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
|
||||
|
||||
helmAnchor.showModel = slot == EquipmentSlotType.HEAD;
|
||||
bodyAnchor.showModel = slot == EquipmentSlotType.CHEST;
|
||||
@@ -198,6 +200,6 @@ public class ModelArmorManasteel extends ModelArmor {
|
||||
bipedLeftLeg = bootL;
|
||||
}
|
||||
|
||||
super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.client.model.armor;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
|
||||
@@ -19,28 +18,28 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class ModelArmorManaweave extends ModelArmor {
|
||||
|
||||
private final RendererModel helmAnchor;
|
||||
private final RendererModel helm;
|
||||
private final ModelRenderer helmAnchor;
|
||||
private final ModelRenderer helm;
|
||||
|
||||
private final RendererModel bodyAnchor;
|
||||
private final RendererModel bodyTop;
|
||||
private final RendererModel bodyBottom;
|
||||
private final ModelRenderer bodyAnchor;
|
||||
private final ModelRenderer bodyTop;
|
||||
private final ModelRenderer bodyBottom;
|
||||
|
||||
private final RendererModel armLAnchor;
|
||||
private final RendererModel armL;
|
||||
private final RendererModel armLpauldron;
|
||||
private final RendererModel armRAnchor;
|
||||
private final RendererModel armR;
|
||||
private final RendererModel armRpauldron;
|
||||
private final ModelRenderer armLAnchor;
|
||||
private final ModelRenderer armL;
|
||||
private final ModelRenderer armLpauldron;
|
||||
private final ModelRenderer armRAnchor;
|
||||
private final ModelRenderer armR;
|
||||
private final ModelRenderer armRpauldron;
|
||||
|
||||
private final RendererModel pantsAnchor;
|
||||
private final RendererModel legL;
|
||||
private final RendererModel skirtL;
|
||||
private final RendererModel legR;
|
||||
private final RendererModel skirtR;
|
||||
private final ModelRenderer pantsAnchor;
|
||||
private final ModelRenderer legL;
|
||||
private final ModelRenderer skirtL;
|
||||
private final ModelRenderer legR;
|
||||
private final ModelRenderer skirtR;
|
||||
|
||||
private final RendererModel bootL;
|
||||
private final RendererModel bootR;
|
||||
private final ModelRenderer bootL;
|
||||
private final ModelRenderer bootR;
|
||||
|
||||
public ModelArmorManaweave(EquipmentSlotType slot) {
|
||||
super(slot);
|
||||
@@ -50,84 +49,84 @@ public class ModelArmorManaweave extends ModelArmor {
|
||||
float s = 0.01F;
|
||||
|
||||
//helm
|
||||
this.helmAnchor = new RendererModel(this, 0, 0);
|
||||
this.helmAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.helmAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.helmAnchor.addBox(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
|
||||
this.helm = new RendererModel(this, 0, 0);
|
||||
this.helmAnchor.addCuboid(-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.addBox(-4.5F, -9.5F, -4.0F, 9, 11, 10, s);
|
||||
this.helm.addCuboid(-4.5F, -9.5F, -4.0F, 9, 11, 10, s);
|
||||
this.setRotateAngle(helm, 0.17453292519943295F, 0.0F, 0.0F);
|
||||
|
||||
//body
|
||||
this.bodyAnchor = new RendererModel(this, 0, 0);
|
||||
this.bodyAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.bodyAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.bodyAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
|
||||
this.bodyTop = new RendererModel(this, 0, 21);
|
||||
this.bodyAnchor.addCuboid(-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.addBox(-4.5F, -0.5F, -3.0F, 9, 7, 6, s);
|
||||
this.bodyTop.addCuboid(-4.5F, -0.5F, -3.0F, 9, 7, 6, s);
|
||||
this.setRotateAngle(bodyTop, 0.0F, 0.0F, 0.0F);
|
||||
this.bodyBottom = new RendererModel(this, 0, 34);
|
||||
this.bodyBottom = new ModelRenderer(this, 0, 34);
|
||||
this.bodyBottom.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.bodyBottom.addBox(-4.5F, 6.5F, -2.5F, 9, 5, 5, s);
|
||||
this.bodyBottom.addCuboid(-4.5F, 6.5F, -2.5F, 9, 5, 5, s);
|
||||
this.setRotateAngle(bodyBottom, -0F, 0.0F, 0.0F);
|
||||
|
||||
//armL
|
||||
this.armLAnchor = new RendererModel(this, 0, 0);
|
||||
this.armLAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.armLAnchor.mirror = true;
|
||||
this.armLAnchor.setRotationPoint(4.0F, 2.0F, 0.0F);
|
||||
this.armLAnchor.addBox(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
|
||||
this.armL = new RendererModel(this, 0, 44);
|
||||
this.armLAnchor.addCuboid(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.addBox(-1.5F, -2.5F, -2.49F, 5, 10, 5, s);
|
||||
this.armLpauldron = new RendererModel(this, 20, 44);
|
||||
this.armL.addCuboid(-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.addBox(-1.0F, -3.0F, -3.0F, 6, 5, 6, s);
|
||||
this.armLpauldron.addCuboid(-1.0F, -3.0F, -3.0F, 6, 5, 6, s);
|
||||
this.setRotateAngle(armLpauldron, 0.0F, 0.0F, -0.08726646259971647F);
|
||||
|
||||
//armR
|
||||
this.armRAnchor = new RendererModel(this, 0, 0);
|
||||
this.armRAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.armRAnchor.mirror = true;
|
||||
this.armRAnchor.setRotationPoint(-4.0F, 2.0F, 0.0F);
|
||||
this.armRAnchor.addBox(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
|
||||
this.armR = new RendererModel(this, 0, 44);
|
||||
this.armRAnchor.addCuboid(-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.addBox(-3.5F, -2.5F, -2.51F, 5, 10, 5, s);
|
||||
this.armRpauldron = new RendererModel(this, 20, 44);
|
||||
this.armR.addCuboid(-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.addBox(-5.0F, -3.0F, -3.0F, 6, 5, 6, s);
|
||||
this.armRpauldron.addCuboid(-5.0F, -3.0F, -3.0F, 6, 5, 6, s);
|
||||
this.setRotateAngle(armRpauldron, 0.0F, 0.0F, 0.08726646259971647F);
|
||||
|
||||
//pants
|
||||
this.pantsAnchor = new RendererModel(this, 0, 0);
|
||||
this.pantsAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.pantsAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.pantsAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
|
||||
this.legL = new RendererModel(this, 0, 78);
|
||||
this.pantsAnchor.addCuboid(-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.addBox(-2.39F, -0.5F, -2.49F, 5, 6, 5, s);
|
||||
this.skirtL = new RendererModel(this, 0, 59);
|
||||
this.legL.addCuboid(-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.addBox(-1.0F, 0.0F, -0.5F, 5, 13, 6, s);
|
||||
this.skirtL.addCuboid(-1.0F, 0.0F, -0.5F, 5, 13, 6, s);
|
||||
this.setRotateAngle(skirtL, 0.0F, -0.17453292519943295F, -0.2617993877991494F);
|
||||
this.legR = new RendererModel(this, 0, 78);
|
||||
this.legR = new ModelRenderer(this, 0, 78);
|
||||
this.legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
this.legR.addBox(-2.61F, 0.0F, -2.51F, 5, 6, 5, s);
|
||||
this.skirtR = new RendererModel(this, 0, 59);
|
||||
this.legR.addCuboid(-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.addBox(-4.0F, 0.0F, -0.5F, 5, 13, 6, s);
|
||||
this.skirtR.addCuboid(-4.0F, 0.0F, -0.5F, 5, 13, 6, s);
|
||||
this.setRotateAngle(skirtR, 0.0F, 0.17453292519943295F, 0.2617993877991494F);
|
||||
|
||||
//boot
|
||||
this.bootL = new RendererModel(this, 0, 89);
|
||||
this.bootL = new ModelRenderer(this, 0, 89);
|
||||
this.bootL.mirror = true;
|
||||
this.bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.bootL.addBox(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
|
||||
this.bootR = new RendererModel(this, 0, 89);
|
||||
this.bootL.addCuboid(-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.addBox(-2.61F, 8.5F, -2.51F, 5, 4, 5, s);
|
||||
this.bootR.addCuboid(-2.61F, 8.5F, -2.51F, 5, 4, 5, s);
|
||||
|
||||
//hierarchy
|
||||
this.helmAnchor.addChild(this.helm);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.client.model.armor;
|
||||
|
||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||
import net.minecraft.client.renderer.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
@@ -19,50 +19,50 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class ModelArmorTerrasteel extends ModelArmor {
|
||||
|
||||
private final RendererModel helmAnchor;
|
||||
private final RendererModel helm;
|
||||
private final RendererModel helmFront;
|
||||
private final RendererModel helmLeaf1l;
|
||||
private final RendererModel helmLeaf2l;
|
||||
private final RendererModel helmLeaf3l;
|
||||
private final RendererModel helmLeaf1r;
|
||||
private final RendererModel helmLeaf2r;
|
||||
private final RendererModel helmLeaf3r;
|
||||
private final RendererModel helmbranch1l;
|
||||
private final RendererModel helmbranch2l;
|
||||
private final RendererModel helmbranch1r;
|
||||
private final RendererModel helmbranch2r;
|
||||
private final ModelRenderer helmAnchor;
|
||||
private final ModelRenderer helm;
|
||||
private final ModelRenderer helmFront;
|
||||
private final ModelRenderer helmLeaf1l;
|
||||
private final ModelRenderer helmLeaf2l;
|
||||
private final ModelRenderer helmLeaf3l;
|
||||
private final ModelRenderer helmLeaf1r;
|
||||
private final ModelRenderer helmLeaf2r;
|
||||
private final ModelRenderer helmLeaf3r;
|
||||
private final ModelRenderer helmbranch1l;
|
||||
private final ModelRenderer helmbranch2l;
|
||||
private final ModelRenderer helmbranch1r;
|
||||
private final ModelRenderer helmbranch2r;
|
||||
|
||||
private final RendererModel bodyAnchor;
|
||||
private final RendererModel bodyTop;
|
||||
private final RendererModel bodyBottom;
|
||||
private final ModelRenderer bodyAnchor;
|
||||
private final ModelRenderer bodyTop;
|
||||
private final ModelRenderer bodyBottom;
|
||||
|
||||
private final RendererModel armLAnchor;
|
||||
private final RendererModel armL;
|
||||
private final RendererModel armLpauldron;
|
||||
private final RendererModel armLbranch1;
|
||||
private final RendererModel armLbranch2;
|
||||
private final ModelRenderer armLAnchor;
|
||||
private final ModelRenderer armL;
|
||||
private final ModelRenderer armLpauldron;
|
||||
private final ModelRenderer armLbranch1;
|
||||
private final ModelRenderer armLbranch2;
|
||||
|
||||
private final RendererModel armRAnchor;
|
||||
private final RendererModel armR;
|
||||
private final RendererModel armRpauldron;
|
||||
private final RendererModel armRbranch1;
|
||||
private final RendererModel armRbranch2;
|
||||
private final ModelRenderer armRAnchor;
|
||||
private final ModelRenderer armR;
|
||||
private final ModelRenderer armRpauldron;
|
||||
private final ModelRenderer armRbranch1;
|
||||
private final ModelRenderer armRbranch2;
|
||||
|
||||
private final RendererModel pantsAnchor;
|
||||
private final RendererModel belt;
|
||||
private final RendererModel legL;
|
||||
private final RendererModel legR;
|
||||
private final ModelRenderer pantsAnchor;
|
||||
private final ModelRenderer belt;
|
||||
private final ModelRenderer legL;
|
||||
private final ModelRenderer legR;
|
||||
|
||||
private final RendererModel bootL;
|
||||
private final RendererModel bootLtop;
|
||||
private final RendererModel bootLbranch1;
|
||||
private final RendererModel bootLbranch2;
|
||||
private final ModelRenderer bootL;
|
||||
private final ModelRenderer bootLtop;
|
||||
private final ModelRenderer bootLbranch1;
|
||||
private final ModelRenderer bootLbranch2;
|
||||
|
||||
private final RendererModel bootR;
|
||||
private final RendererModel bootRtop;
|
||||
private final RendererModel bootRbranch1;
|
||||
private final RendererModel bootRbranch2;
|
||||
private final ModelRenderer bootR;
|
||||
private final ModelRenderer bootRtop;
|
||||
private final ModelRenderer bootRbranch1;
|
||||
private final ModelRenderer bootRbranch2;
|
||||
|
||||
public ModelArmorTerrasteel(EquipmentSlotType slot) {
|
||||
super(slot);
|
||||
@@ -72,163 +72,163 @@ public class ModelArmorTerrasteel extends ModelArmor {
|
||||
float s = 0.01F;
|
||||
|
||||
//helm
|
||||
this.helmAnchor = new RendererModel(this, 0, 0);
|
||||
this.helmAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.helmAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.helmAnchor.addBox(-1.0F, -2.0F, 0.0F, 2, 2, 2, s);
|
||||
this.helm = new RendererModel(this, 0, 0);
|
||||
this.helmAnchor.addCuboid(-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.addBox(-4.5F, -9.0F, -4.5F, 9, 11, 9, s);
|
||||
this.helmFront = new RendererModel(this, 36, 0);
|
||||
this.helm.addCuboid(-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.addBox(-1.5F, -10.0F, -5.5F, 3, 8, 7, s);
|
||||
this.helmLeaf1l = new RendererModel(this, 56, 14);
|
||||
this.helmFront.addCuboid(-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.addBox(0.0F, -3.0F, -1.0F, 2, 3, 1, s);
|
||||
this.helmLeaf1l.addCuboid(0.0F, -3.0F, -1.0F, 2, 3, 1, s);
|
||||
this.setRotateAngle(helmLeaf1l, -0.2617993877991494F, -0.2617993877991494F, 0.5235987755982988F);
|
||||
this.helmLeaf2l = new RendererModel(this, 56, 8);
|
||||
this.helmLeaf2l = new ModelRenderer(this, 56, 8);
|
||||
this.helmLeaf2l.mirror = true;
|
||||
this.helmLeaf2l.setRotationPoint(4.5F, -6.0F, -0.5F);
|
||||
this.helmLeaf2l.addBox(0.0F, -5.0F, -1.0F, 2, 5, 1, s);
|
||||
this.helmLeaf2l.addCuboid(0.0F, -5.0F, -1.0F, 2, 5, 1, s);
|
||||
this.setRotateAngle(helmLeaf2l, -0.5235987755982988F, -0.5235987755982988F, 0.7853981633974483F);
|
||||
this.helmLeaf3l = new RendererModel(this, 56, 0);
|
||||
this.helmLeaf3l = new ModelRenderer(this, 56, 0);
|
||||
this.helmLeaf3l.mirror = true;
|
||||
this.helmLeaf3l.setRotationPoint(4.5F, -6.0F, 2.5F);
|
||||
this.helmLeaf3l.addBox(0.0F, -7.0F, -1.0F, 2, 7, 1, s);
|
||||
this.helmLeaf3l.addCuboid(0.0F, -7.0F, -1.0F, 2, 7, 1, s);
|
||||
this.setRotateAngle(helmLeaf3l, -0.7853981633974483F, -0.7853981633974483F, 0.7853981633974483F);
|
||||
this.helmLeaf1r = new RendererModel(this, 56, 14);
|
||||
this.helmLeaf1r = new ModelRenderer(this, 56, 14);
|
||||
this.helmLeaf1r.setRotationPoint(-4.5F, -6.0F, -2.5F);
|
||||
this.helmLeaf1r.addBox(-2.0F, -3.0F, -1.0F, 2, 3, 1, s);
|
||||
this.helmLeaf1r.addCuboid(-2.0F, -3.0F, -1.0F, 2, 3, 1, s);
|
||||
this.setRotateAngle(helmLeaf1r, -0.2617993877991494F, 0.2617993877991494F, -0.5235987755982988F);
|
||||
this.helmLeaf2r = new RendererModel(this, 56, 8);
|
||||
this.helmLeaf2r = new ModelRenderer(this, 56, 8);
|
||||
this.helmLeaf2r.setRotationPoint(-4.5F, -6.0F, -0.5F);
|
||||
this.helmLeaf2r.addBox(-2.0F, -5.0F, -1.0F, 2, 5, 1, s);
|
||||
this.helmLeaf2r.addCuboid(-2.0F, -5.0F, -1.0F, 2, 5, 1, s);
|
||||
this.setRotateAngle(helmLeaf2r, -0.5235987755982988F, 0.5235987755982988F, -0.7853981633974483F);
|
||||
this.helmLeaf3r = new RendererModel(this, 56, 0);
|
||||
this.helmLeaf3r = new ModelRenderer(this, 56, 0);
|
||||
this.helmLeaf3r.setRotationPoint(-4.5F, -6.0F, 2.5F);
|
||||
this.helmLeaf3r.addBox(-2.0F, -7.0F, -1.0F, 2, 7, 1, s);
|
||||
this.helmLeaf3r.addCuboid(-2.0F, -7.0F, -1.0F, 2, 7, 1, s);
|
||||
this.setRotateAngle(helmLeaf3r, -0.7853981633974483F, 0.7853981633974483F, -0.7853981633974483F);
|
||||
this.helmbranch1l = new RendererModel(this, 36, 15);
|
||||
this.helmbranch1l = new ModelRenderer(this, 36, 15);
|
||||
this.helmbranch1l.mirror = true;
|
||||
this.helmbranch1l.setRotationPoint(2.5F, -9.0F, -3.5F);
|
||||
this.helmbranch1l.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.helmbranch1l.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.setRotateAngle(helmbranch1l, 0.5235987755982988F, 0.2617993877991494F, 0.0F);
|
||||
this.helmbranch2l = new RendererModel(this, 36, 15);
|
||||
this.helmbranch2l = new ModelRenderer(this, 36, 15);
|
||||
this.helmbranch2l.mirror = true;
|
||||
this.helmbranch2l.setRotationPoint(4.5F, -3.0F, -2.5F);
|
||||
this.helmbranch2l.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.helmbranch2l.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.setRotateAngle(helmbranch2l, 0.08726646259971647F, 0.2617993877991494F, 0.0F);
|
||||
this.helmbranch1r = new RendererModel(this, 36, 15);
|
||||
this.helmbranch1r = new ModelRenderer(this, 36, 15);
|
||||
this.helmbranch1r.setRotationPoint(-2.5F, -9.0F, -3.5F);
|
||||
this.helmbranch1r.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.helmbranch1r.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.setRotateAngle(helmbranch1r, 0.5235987755982988F, -0.2617993877991494F, 0.0F);
|
||||
this.helmbranch2r = new RendererModel(this, 36, 15);
|
||||
this.helmbranch2r = new ModelRenderer(this, 36, 15);
|
||||
this.helmbranch2r.setRotationPoint(-4.5F, -3.0F, -2.5F);
|
||||
this.helmbranch2r.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.helmbranch2r.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.setRotateAngle(helmbranch2r, 0.08726646259971647F, -0.2617993877991494F, 0.0F);
|
||||
|
||||
//body
|
||||
this.bodyAnchor = new RendererModel(this, 0, 0);
|
||||
this.bodyAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.bodyAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.bodyAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
|
||||
this.bodyTop = new RendererModel(this, 0, 20);
|
||||
this.bodyAnchor.addCuboid(-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.addBox(-5.5F, 0.0F, -3.0F, 11, 6, 6, s);
|
||||
this.bodyBottom = new RendererModel(this, 0, 32);
|
||||
this.bodyTop.addCuboid(-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.addBox(-4.5F, 5.0F, -2.5F, 9, 3, 5, s);
|
||||
this.bodyBottom.addCuboid(-4.5F, 5.0F, -2.5F, 9, 3, 5, s);
|
||||
|
||||
//armL
|
||||
this.armLAnchor = new RendererModel(this, 0, 0);
|
||||
this.armLAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.armLAnchor.mirror = true;
|
||||
this.armLAnchor.setRotationPoint(4.0F, 2.0F, 0.0F);
|
||||
this.armLAnchor.addBox(0.0F, -1.0F, -1.0F, 2, 2, 2, s);
|
||||
this.armL = new RendererModel(this, 0, 52);
|
||||
this.armLAnchor.addCuboid(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.addBox(-1.5F, 3.0F, -2.49F, 5, 8, 5, s);
|
||||
this.armLpauldron = new RendererModel(this, 0, 40);
|
||||
this.armL.addCuboid(-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.addBox(-1.0F, -3.0F, -3.0F, 6, 6, 6, s);
|
||||
this.armLbranch1 = new RendererModel(this, 36, 15);
|
||||
this.armLpauldron.addCuboid(-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.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.armLbranch1.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.setRotateAngle(armLbranch1, 0.5235987755982988F, 0.5235987755982988F, 0.0F);
|
||||
this.armLbranch2 = new RendererModel(this, 36, 24);
|
||||
this.armLbranch2 = new ModelRenderer(this, 36, 24);
|
||||
this.armLbranch2.mirror = true;
|
||||
this.armLbranch2.setRotationPoint(5.0F, -2.0F, 0.0F);
|
||||
this.armLbranch2.addBox(-1.0F, 0.0F, 0.0F, 2, 2, 5, s);
|
||||
this.armLbranch2.addCuboid(-1.0F, 0.0F, 0.0F, 2, 2, 5, s);
|
||||
this.setRotateAngle(armLbranch2, 0.08726646259971647F, 0.7853981633974483F, 0.0F);
|
||||
|
||||
//armR
|
||||
this.armRAnchor = new RendererModel(this, 0, 0);
|
||||
this.armRAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.armRAnchor.mirror = true;
|
||||
this.armRAnchor.setRotationPoint(-4.0F, 2.0F, 0.0F);
|
||||
this.armRAnchor.addBox(-2.0F, -1.0F, -1.0F, 2, 2, 2, s);
|
||||
this.armR = new RendererModel(this, 0, 52);
|
||||
this.armRAnchor.addCuboid(-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.addBox(-3.5F, 3.0F, -2.51F, 5, 8, 5, s);
|
||||
this.armRpauldron = new RendererModel(this, 0, 40);
|
||||
this.armR.addCuboid(-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.addBox(-5.0F, -3.0F, -3.0F, 6, 6, 6, s);
|
||||
this.armRbranch1 = new RendererModel(this, 36, 15);
|
||||
this.armRpauldron.addCuboid(-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.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.armRbranch1.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.setRotateAngle(armRbranch1, 0.5235987755982988F, -0.5235987755982988F, 0.0F);
|
||||
this.armRbranch2 = new RendererModel(this, 36, 24);
|
||||
this.armRbranch2 = new ModelRenderer(this, 36, 24);
|
||||
this.armRbranch2.setRotationPoint(-5.0F, -2.0F, 0.0F);
|
||||
this.armRbranch2.addBox(-1.0F, 0.0F, 0.0F, 2, 2, 5, s);
|
||||
this.armRbranch2.addCuboid(-1.0F, 0.0F, 0.0F, 2, 2, 5, s);
|
||||
this.setRotateAngle(armRbranch2, 0.08726646259971647F, -0.7853981633974483F, 0.0F);
|
||||
|
||||
//pants
|
||||
this.pantsAnchor = new RendererModel(this, 0, 0);
|
||||
this.pantsAnchor = new ModelRenderer(this, 0, 0);
|
||||
this.pantsAnchor.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.pantsAnchor.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, s);
|
||||
this.belt = new RendererModel(this, 0, 65);
|
||||
this.pantsAnchor.addCuboid(-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.addBox(-4.5F, 8.0F, -3.0F, 9, 5, 6, s);
|
||||
this.legL = new RendererModel(this, 0, 76);
|
||||
this.belt.addCuboid(-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.addBox(-2.39F, -0.01F, -2.49F, 5, 6, 5, s);
|
||||
this.legR = new RendererModel(this, 0, 76);
|
||||
this.legL.addCuboid(-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.addBox(-2.61F, -0.01F, -2.51F, 5, 6, 5, s);
|
||||
this.legR.addCuboid(-2.61F, -0.01F, -2.51F, 5, 6, 5, s);
|
||||
|
||||
//boots
|
||||
this.bootL = new RendererModel(this, 0, 94);
|
||||
this.bootL = new ModelRenderer(this, 0, 94);
|
||||
this.bootL.mirror = true;
|
||||
this.bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.bootL.addBox(-2.39F, 8.5F, -2.49F, 5, 4, 5, s);
|
||||
this.bootLtop = new RendererModel(this, 0, 87);
|
||||
this.bootL.addCuboid(-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.addBox(-2.39F, 6.0F, -2.49F, 6, 2, 5, s);
|
||||
this.bootLbranch1 = new RendererModel(this, 36, 15);
|
||||
this.bootLtop.addCuboid(-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.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7,s);
|
||||
this.bootLbranch1.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7,s);
|
||||
this.setRotateAngle(bootLbranch1, 0.2617993877991494F, 0.2617993877991494F, -0.08726646259971647F);
|
||||
this.bootLbranch2 = new RendererModel(this, 36, 24);
|
||||
this.bootLbranch2 = new ModelRenderer(this, 36, 24);
|
||||
this.bootLbranch2.mirror = true;
|
||||
this.bootLbranch2.setRotationPoint(2.5F, 9.0F, 0.0F);
|
||||
this.bootLbranch2.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 5, s);
|
||||
this.bootLbranch2.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 5, s);
|
||||
this.setRotateAngle(bootLbranch2, 0.08726646259971647F, 0.7853981633974483F, 0.0F);
|
||||
this.bootR = new RendererModel(this, 0, 94);
|
||||
this.bootR = new ModelRenderer(this, 0, 94);
|
||||
this.bootR.setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
this.bootR.addBox(-2.61F, 8.5F, -2.51F, 5, 4, 5, s);
|
||||
this.bootRtop = new RendererModel(this, 0, 87);
|
||||
this.bootR.addCuboid(-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.addBox(-3.61F, 6.0F, -2.51F, 6, 2, 5, s);
|
||||
this.bootRbranch1 = new RendererModel(this, 36, 15);
|
||||
this.bootRtop.addCuboid(-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.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.bootRbranch1.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 7, s);
|
||||
this.setRotateAngle(bootRbranch1, 0.2617993877991494F, -0.2617993877991494F, 0.08726646259971647F);
|
||||
this.bootRbranch2 = new RendererModel(this, 36, 24);
|
||||
this.bootRbranch2 = new ModelRenderer(this, 36, 24);
|
||||
this.bootRbranch2.setRotationPoint(-2.5F, 9.0F, 0.5F);
|
||||
this.bootRbranch2.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 5, s);
|
||||
this.bootRbranch2.addCuboid(-1.0F, -1.0F, 0.0F, 2, 2, 5, s);
|
||||
this.setRotateAngle(bootRbranch2, 0.08726646259971647F, -0.7853981633974483F, 0.0F);
|
||||
|
||||
//hierarchy
|
||||
|
||||
@@ -32,7 +32,7 @@ public class RenderPoolMinecart extends MinecartRenderer<EntityPoolMinecart> {
|
||||
protected void renderCartContents(EntityPoolMinecart poolCart, float partialTicks, @Nonnull BlockState state) {
|
||||
super.renderCartContents(poolCart, partialTicks, state);
|
||||
RenderTilePool.cartMana = poolCart.getMana();
|
||||
TileEntityRendererDispatcher.instance.getRenderer(TilePool.class).render(null, poolCart.posX, poolCart.posY, poolCart.posZ, ClientTickHandler.partialTicks, -1);
|
||||
TileEntityRendererDispatcher.instance.getRenderer(TilePool.class).render(null, poolCart.getX(), poolCart.getY(), poolCart.getZ(), ClientTickHandler.partialTicks, -1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ public class SkyblockSkyRenderer implements IRenderHandler {
|
||||
|
||||
// Botania - darken when in void
|
||||
float insideVoid = 0;
|
||||
if(mc.player.posY <= -2)
|
||||
insideVoid = (float) Math.min(1F, -(mc.player.posY + 2) / 30F);
|
||||
if(mc.player.getY() <= -2)
|
||||
insideVoid = (float) Math.min(1F, -(mc.player.getY() + 2) / 30F);
|
||||
|
||||
f = Math.max(0F, f - insideVoid);
|
||||
f1 = Math.max(0F, f1 - insideVoid);
|
||||
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IEnviromentBlockReader;
|
||||
import net.minecraft.world.ILightReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
@@ -100,7 +100,7 @@ public class BlockAltar extends BlockMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(@Nonnull BlockState state, IEnviromentBlockReader world, @Nonnull BlockPos pos) {
|
||||
public int getLightValue(@Nonnull BlockState state, ILightReader world, @Nonnull BlockPos pos) {
|
||||
if(world.getBlockState(pos).getBlock() != this)
|
||||
return world.getBlockState(pos).getLightValue(world, pos);
|
||||
TileAltar tile = (TileAltar) world.getTileEntity(pos);
|
||||
|
||||
@@ -47,8 +47,8 @@ public class BlockCraftyCrate extends BlockOpenCrate implements IWandHUD {
|
||||
|
||||
int width = 52;
|
||||
int height = 52;
|
||||
int xc = mc.mainWindow.getScaledWidth() / 2 + 20;
|
||||
int yc = mc.mainWindow.getScaledHeight() / 2 - height / 2;
|
||||
int xc = mc.getWindow().getScaledWidth() / 2 + 20;
|
||||
int yc = mc.getWindow().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);
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IEnviromentBlockReader;
|
||||
import net.minecraft.world.ILightReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.storage.loot.LootContext;
|
||||
import net.minecraft.world.storage.loot.LootParameters;
|
||||
@@ -47,7 +47,7 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(@Nonnull BlockState state, IEnviromentBlockReader world, @Nonnull BlockPos pos) {
|
||||
public int getLightValue(@Nonnull BlockState state, ILightReader world, @Nonnull BlockPos pos) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
return tile instanceof TileEntitySpecialFlower ? ((TileEntitySpecialFlower) tile).getLightValue() : lightValue;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -35,6 +35,7 @@ import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.common.block.tile.TilePlatform;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockPlatform extends BlockMod implements IWandable, IManaCollisionGhost {
|
||||
|
||||
@@ -58,8 +59,8 @@ public class BlockPlatform extends BlockMod implements IWandable, IManaCollision
|
||||
if(variant == Variant.INFRANGIBLE
|
||||
|| variant == Variant.ABSTRUSE
|
||||
&& e != null
|
||||
&& e.posY > pos.getY() + 0.9
|
||||
&& !context.isSneaking()) {
|
||||
&& e.getY() > pos.getY() + 0.9
|
||||
&& !context.isDescending()) {
|
||||
return super.getCollisionShape(state, world, pos, context);
|
||||
} else {
|
||||
return VoxelShapes.empty();
|
||||
@@ -98,12 +99,13 @@ public class BlockPlatform extends BlockMod implements IWandable, IManaCollision
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isValidBlock(BlockState state, World world, BlockPos pos) {
|
||||
return state.isOpaqueCube(world, pos) || state.getRenderType() == BlockRenderType.MODEL;
|
||||
public static boolean isValidBlock(@Nullable BlockState state, World world, BlockPos pos) {
|
||||
return state != null && (state.isOpaqueCube(world, pos) || state.getRenderType() == BlockRenderType.MODEL);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
public ActionResultType onUse(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()
|
||||
@@ -119,11 +121,11 @@ public class BlockPlatform extends BlockMod implements IWandable, IManaCollision
|
||||
world.notifyBlockUpdate(pos, state, state, 3);
|
||||
}
|
||||
|
||||
return true;
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import net.minecraft.item.DyeColor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -28,7 +29,7 @@ import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IEnviromentBlockReader;
|
||||
import net.minecraft.world.ILightReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.storage.loot.LootContext;
|
||||
import net.minecraft.world.storage.loot.LootParameters;
|
||||
@@ -61,7 +62,7 @@ public class BlockSpecialFlower extends FlowerBlock implements IWandable, IWandH
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(@Nonnull BlockState state, IEnviromentBlockReader world, @Nonnull BlockPos pos) {
|
||||
public int getLightValue(@Nonnull BlockState state, ILightReader world, @Nonnull BlockPos pos) {
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if (te instanceof TileEntitySpecialFlower) {
|
||||
return ((TileEntitySpecialFlower) te).getLightValue();
|
||||
@@ -152,14 +153,14 @@ public class BlockSpecialFlower extends FlowerBlock implements IWandable, IWandH
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!stack.isEmpty() && stack.getItem() instanceof ItemDye) {
|
||||
DyeColor newColor = ((ItemDye) stack.getItem()).color;
|
||||
DyeColor oldColor = state.get(BotaniaStateProps.COLOR);
|
||||
if(newColor != oldColor)
|
||||
world.setBlockState(pos, state.with(BotaniaStateProps.COLOR, newColor), 1 | 2);
|
||||
return true;
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
return ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, hand, hit);
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
@@ -52,7 +53,7 @@ public class BlockManaFlame extends BlockMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
public ActionResultType onUse(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))) {
|
||||
@@ -60,11 +61,11 @@ public class BlockManaFlame extends BlockMod {
|
||||
stack.shrink(1);
|
||||
ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(ModItems.lexicon));
|
||||
}
|
||||
return true;
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -242,8 +242,8 @@ public class SubTileHopperhock extends TileEntityFunctionalFlower {
|
||||
String filter = I18n.format("botaniamisc.filter" + filterType);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(filter) / 2;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 + 30;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(filter) / 2;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 + 30;
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(filter, x, y, color);
|
||||
GlStateManager.disableBlend();
|
||||
|
||||
@@ -200,7 +200,7 @@ public class SubTileLoonuim extends TileEntityFunctionalFlower {
|
||||
CompoundNBT cmp = e.getPersistentData().getCompound(TAG_ITEMSTACK_TO_DROP);
|
||||
ItemStack stack = ItemStack.read(cmp);
|
||||
event.getDrops().clear();
|
||||
event.getDrops().add(new ItemEntity(e.world, e.posX, e.posY, e.posZ, stack));
|
||||
event.getDrops().add(new ItemEntity(e.world, e.getX(), e.getY(), e.getZ(), stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -155,8 +155,8 @@ public class SubTileRannuncarpus extends TileEntityFunctionalFlower {
|
||||
if(!recieverStack.isEmpty()) {
|
||||
ITextComponent stackName = recieverStack.getDisplayName();
|
||||
int width = 16 + mc.fontRenderer.getStringWidth(stackName.getString()) / 2;
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - width;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 + 30;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - width;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 + 30;
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(stackName.getFormattedText(), x + 20, y + 5, color);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
|
||||
@@ -56,7 +56,7 @@ public class SubTileSolegnolia extends TileEntityFunctionalFlower {
|
||||
return existingFlowers.stream()
|
||||
.filter(f -> f.redstoneSignal == 0)
|
||||
.filter(f -> f.getWorld() == e.world)
|
||||
.anyMatch(f -> f.getEffectivePos().distanceSq(e.posX, e.posY, e.posZ, false) <= f.getRange() * f.getRange());
|
||||
.anyMatch(f -> f.getEffectivePos().distanceSq(e.getX(), e.getY(), e.getZ(), false) <= f.getRange() * f.getRange());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ public class SubTileSpectranthemum extends TileEntityFunctionalFlower {
|
||||
}
|
||||
|
||||
static void spawnExplosionParticles(Entity item, int p) {
|
||||
PacketHandler.sendToNearby(item.world, new BlockPos(item), new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.ITEM_SMOKE, item.posX, item.posY, item.posZ, item.getEntityId(), p));
|
||||
PacketHandler.sendToNearby(item.world, new BlockPos(item), new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.ITEM_SMOKE, item.getX(), item.getY(), item.getZ(), item.getEntityId(), p));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-3
@@ -56,9 +56,9 @@ public class SubTileTangleberrie extends TileEntityFunctionalFlower {
|
||||
if(entity instanceof PlayerEntity || !entity.isNonBoss())
|
||||
continue;
|
||||
|
||||
double x2 = entity.posX;
|
||||
double y2 = entity.posY;
|
||||
double z2 = entity.posZ;
|
||||
double x2 = entity.getX();
|
||||
double y2 = entity.getY();
|
||||
double z2 = entity.getZ();
|
||||
|
||||
float distance = MathHelper.pointDistanceSpace(x1, y1, z1, x2, y2, z2);
|
||||
|
||||
|
||||
@@ -92,8 +92,8 @@ public class SubTileEndoflame extends TileEntityGeneratingFlower {
|
||||
if(event == START_BURN_EVENT) {
|
||||
Entity e = getWorld().getEntityByID(param);
|
||||
if(e != null) {
|
||||
e.world.addParticle(ParticleTypes.LARGE_SMOKE, e.posX, e.posY + 0.1, e.posZ, 0.0D, 0.0D, 0.0D);
|
||||
e.world.addParticle(ParticleTypes.FLAME, e.posX, e.posY, e.posZ, 0.0D, 0.0D, 0.0D);
|
||||
e.world.addParticle(ParticleTypes.LARGE_SMOKE, e.getX(), e.getY() + 0.1, e.getZ(), 0.0D, 0.0D, 0.0D);
|
||||
e.world.addParticle(ParticleTypes.FLAME, e.getX(), e.getY(), e.getZ(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -64,10 +64,10 @@ public class SubTileEntropinnyum extends TileEntityGeneratingFlower {
|
||||
|
||||
for(int i = 0; i < 50; i++) {
|
||||
SparkleParticleData data = SparkleParticleData.sparkle((float) (Math.random() * 0.65F + 1.25F), 1F, (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, 12);
|
||||
world.addParticle(data, e.posX + Math.random() * 4 - 2, e.posY + Math.random() * 4 - 2, e.posZ + Math.random() * 4 - 2, 0, 0, 0);
|
||||
world.addParticle(data, e.getX() + Math.random() * 4 - 2, e.getY() + Math.random() * 4 - 2, e.getZ() + Math.random() * 4 - 2, 0, 0, 0);
|
||||
}
|
||||
|
||||
getWorld().addParticle(ParticleTypes.EXPLOSION_EMITTER, e.posX, e.posY, e.posZ, 1D, 0D, 0D);
|
||||
getWorld().addParticle(ParticleTypes.EXPLOSION_EMITTER, e.getX(), e.getY(), e.getZ(), 1D, 0D, 0D);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class SubTileGourmaryllis extends TileEntityGeneratingFlower {
|
||||
cooldown = val * 10;
|
||||
item.playSound(SoundEvents.ENTITY_GENERIC_EAT, 0.2F, 0.6F);
|
||||
sync();
|
||||
((ServerWorld) getWorld()).spawnParticle(new ItemParticleData(ParticleTypes.ITEM, stack), item.posX, item.posY, item.posZ, 20, 0.1D, 0.1D, 0.1D, 0.05D);
|
||||
((ServerWorld) getWorld()).spawnParticle(new ItemParticleData(ParticleTypes.ITEM, stack), item.getX(), item.getY(), item.getZ(), 20, 0.1D, 0.1D, 0.1D, 0.05D);
|
||||
}
|
||||
|
||||
item.remove();
|
||||
|
||||
@@ -68,7 +68,7 @@ public class SubTileNarslimmus extends TileEntityGeneratingFlower {
|
||||
float f2 = MathHelper.sin(f) * size * 0.5F * f1;
|
||||
float f3 = MathHelper.cos(f) * size * 0.5F * f1;
|
||||
float f4 = slime.world.rand.nextFloat() * size * 0.5F * f1;
|
||||
slime.world.addParticle(ParticleTypes.ITEM_SLIME, slime.posX + f2, slime.getBoundingBox().minY + f4, slime.posZ + f3, 0.0D, 0.0D, 0.0D);
|
||||
slime.world.addParticle(ParticleTypes.ITEM_SLIME, slime.getX() + f2, slime.getBoundingBox().minY + f4, slime.getZ() + f3, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ public class SubTileShulkMeNot extends TileEntityGeneratingFlower {
|
||||
if(world instanceof ServerWorld) {
|
||||
ServerWorld ws = (ServerWorld) world;
|
||||
ws.spawnParticle(ParticleTypes.EXPLOSION,
|
||||
entity.posX + entity.getWidth() / 2,
|
||||
entity.posY + entity.getHeight() / 2,
|
||||
entity.posZ + entity.getWidth() / 2,
|
||||
entity.getX() + entity.getWidth() / 2,
|
||||
entity.getY() + entity.getHeight() / 2,
|
||||
entity.getZ() + entity.getWidth() / 2,
|
||||
100, entity.getWidth(), entity.getHeight(), entity.getWidth(), 0.05);
|
||||
ws.spawnParticle(ParticleTypes.PORTAL, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 40, 0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
@@ -84,10 +84,10 @@ public class SubTileSpectrolus extends TileEntityGeneratingFlower {
|
||||
sheep.playSound(SoundEvents.ENTITY_GENERIC_EAT, 1, 1);
|
||||
|
||||
ItemStack morbid = new ItemStack(sheep.isBurning() ? Items.COOKED_MUTTON : Items.MUTTON);
|
||||
((ServerWorld) getWorld()).spawnParticle(new ItemParticleData(ParticleTypes.ITEM, morbid), target.posX, target.posY + target.getEyeHeight(), target.posZ, 20, 0.1D, 0.1D, 0.1D, 0.05D);
|
||||
((ServerWorld) getWorld()).spawnParticle(new ItemParticleData(ParticleTypes.ITEM, morbid), target.getX(), target.getY() + target.getEyeHeight(), target.getZ(), 20, 0.1D, 0.1D, 0.1D, 0.05D);
|
||||
|
||||
ItemStack wool = new ItemStack(ModBlocks.getWool(sheep.getFleeceColor()));
|
||||
((ServerWorld) getWorld()).spawnParticle(new ItemParticleData(ParticleTypes.ITEM, wool), target.posX, target.posY + target.getEyeHeight(), target.posZ, 20, 0.1D, 0.1D, 0.1D, 0.05D);
|
||||
((ServerWorld) getWorld()).spawnParticle(new ItemParticleData(ParticleTypes.ITEM, wool), target.getX(), target.getY() + target.getEyeHeight(), target.getZ(), 20, 0.1D, 0.1D, 0.1D, 0.05D);
|
||||
}
|
||||
sheep.setHealth(0);
|
||||
} else if (target instanceof ItemEntity) {
|
||||
@@ -98,7 +98,7 @@ public class SubTileSpectrolus extends TileEntityGeneratingFlower {
|
||||
|
||||
if(expected.asItem() == stack.getItem()) {
|
||||
addManaAndCycle(WOOL_GEN);
|
||||
((ServerWorld) getWorld()).spawnParticle(new ItemParticleData(ParticleTypes.ITEM, stack), target.posX, target.posY, target.posZ, 20, 0.1D, 0.1D, 0.1D, 0.05D);
|
||||
((ServerWorld) getWorld()).spawnParticle(new ItemParticleData(ParticleTypes.ITEM, stack), target.getX(), target.getY(), target.getZ(), 20, 0.1D, 0.1D, 0.1D, 0.05D);
|
||||
}
|
||||
|
||||
target.remove();
|
||||
@@ -141,8 +141,8 @@ public class SubTileSpectrolus extends TileEntityGeneratingFlower {
|
||||
if(!stack.isEmpty()) {
|
||||
ITextComponent stackName = stack.getDisplayName();
|
||||
int width = 16 + mc.fontRenderer.getStringWidth(stackName.getString()) / 2;
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - width;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 + 30;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - width;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 + 30;
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(stackName.getFormattedText(), x + 20, y + 5, color);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.LazyLoadBase;
|
||||
import net.minecraft.util.LazyValue;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -52,7 +52,7 @@ public class TileAlfPortal extends TileMod implements ITickableTileEntity {
|
||||
@ObjectHolder(LibMisc.MOD_ID + ":" + LibBlockNames.ALF_PORTAL)
|
||||
public static TileEntityType<TileAlfPortal> TYPE;
|
||||
|
||||
public static final LazyLoadBase<IMultiblock> MULTIBLOCK = new LazyLoadBase<>(() -> PatchouliAPI.instance.makeMultiblock(
|
||||
public static final LazyValue<IMultiblock> MULTIBLOCK = new LazyValue<>(() -> PatchouliAPI.instance.makeMultiblock(
|
||||
new String[][] {
|
||||
{ "_", "W", "G", "W", "_" },
|
||||
{ "W", " ", " ", " ", "W" },
|
||||
|
||||
@@ -238,7 +238,7 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary,
|
||||
}
|
||||
|
||||
if(didAny) {
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_GENERIC_SPLASH, SoundCategory.BLOCKS, 0.1F, 10F);
|
||||
player.world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENTITY_GENERIC_SPLASH, SoundCategory.BLOCKS, 0.1F, 10F);
|
||||
ServerPlayerEntity mp = (ServerPlayerEntity) player;
|
||||
mp.container.detectAndSendChanges();
|
||||
}
|
||||
@@ -359,8 +359,8 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary,
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void renderHUD(Minecraft mc) {
|
||||
int xc = mc.mainWindow.getScaledWidth() / 2;
|
||||
int yc = mc.mainWindow.getScaledHeight() / 2;
|
||||
int xc = mc.getWindow().getScaledWidth() / 2;
|
||||
int yc = mc.getWindow().getScaledHeight() / 2;
|
||||
|
||||
float angle = -90;
|
||||
int radius = 24;
|
||||
|
||||
@@ -133,8 +133,8 @@ public class TileAnimatedTorch extends TileMod implements ITickableTileEntity {
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void renderHUD(Minecraft mc) {
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 + 10;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 - 8;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 + 10;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 - 8;
|
||||
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(new ItemStack(Blocks.REDSTONE_TORCH), x, y);
|
||||
mc.fontRenderer.drawStringWithShadow(I18n.format("botania.animatedTorch." + torchMode.name().toLowerCase()), x + 18, y + 6, 0xFF4444);
|
||||
|
||||
@@ -255,8 +255,8 @@ public class TileBrewery extends TileSimpleInventory implements IManaReceiver, I
|
||||
public void renderHUD(Minecraft mc) {
|
||||
int manaToGet = getManaCost();
|
||||
if(manaToGet > 0) {
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 + 20;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 - 8;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 + 20;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 - 8;
|
||||
|
||||
if(recipe == null)
|
||||
return;
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.LazyLoadBase;
|
||||
import net.minecraft.util.LazyValue;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.ResourceLocationException;
|
||||
import net.minecraft.util.Rotation;
|
||||
@@ -111,7 +111,7 @@ public class TileEnchanter extends TileMod implements ISparkAttachable, ITickabl
|
||||
}
|
||||
};
|
||||
|
||||
public static final LazyLoadBase<IMultiblock> MULTIBLOCK = new LazyLoadBase<>(() -> PatchouliAPI.instance.makeMultiblock(
|
||||
public static final LazyValue<IMultiblock> MULTIBLOCK = new LazyValue<>(() -> PatchouliAPI.instance.makeMultiblock(
|
||||
PATTERN,
|
||||
'P', ModBlocks.manaPylon,
|
||||
'L', Blocks.LAPIS_BLOCK,
|
||||
@@ -120,7 +120,7 @@ public class TileEnchanter extends TileMod implements ISparkAttachable, ITickabl
|
||||
'F', StateMatcher.fromPredicate(ModBlocks.whiteFlower, state -> state.getBlock().isIn(ModTags.Blocks.MYSTICAL_FLOWERS))
|
||||
));
|
||||
|
||||
private static final LazyLoadBase<IMultiblock> FORMED_MULTIBLOCK = new LazyLoadBase<>(() -> PatchouliAPI.instance.makeMultiblock(
|
||||
private static final LazyValue<IMultiblock> FORMED_MULTIBLOCK = new LazyValue<>(() -> PatchouliAPI.instance.makeMultiblock(
|
||||
PATTERN,
|
||||
'P', ModBlocks.manaPylon,
|
||||
'L', ModBlocks.enchanter,
|
||||
@@ -478,8 +478,8 @@ public class TileEnchanter extends TileMod implements ISparkAttachable, ITickabl
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void renderHUD() {
|
||||
if(manaRequired > 0 && !itemToEnchant.isEmpty()) {
|
||||
int x = Minecraft.getInstance().mainWindow.getScaledWidth() / 2 + 20;
|
||||
int y = Minecraft.getInstance().mainWindow.getScaledHeight() / 2 - 8;
|
||||
int x = Minecraft.getInstance().getWindow().getScaledWidth() / 2 + 20;
|
||||
int y = Minecraft.getInstance().getWindow().getScaledHeight() / 2 - 8;
|
||||
|
||||
RenderHelper.renderProgressPie(x, y, (float) mana / (float) manaRequired, itemToEnchant);
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ public class TileHourglass extends TileSimpleInventory implements ITickableTileE
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void renderHUD() {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 + 10;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 - 10;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 + 10;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 - 10;
|
||||
|
||||
ItemStack stack = itemHandler.getStackInSlot(0);
|
||||
if(!stack.isEmpty()) {
|
||||
|
||||
@@ -123,9 +123,9 @@ public class TileLightRelay extends TileMod implements ITickableTileEntity, IWan
|
||||
List<EnderPearlEntity> enderPearls = world.getEntitiesWithinAABB(EnderPearlEntity.class, aabb.grow(range));
|
||||
for(EnderPearlEntity pearl : enderPearls) {
|
||||
pearl.setPositionAndUpdate(
|
||||
endpoint.getX() + pearl.posX - pos.getX(),
|
||||
endpoint.getY() + pearl.posY - pos.getY(),
|
||||
endpoint.getZ() + pearl.posZ - pos.getZ()
|
||||
endpoint.getX() + pearl.getX() - pos.getX(),
|
||||
endpoint.getY() + pearl.getY() - pos.getY(),
|
||||
endpoint.getZ() + pearl.getZ() - pos.getZ()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,8 +351,8 @@ public class TileRuneAltar extends TileSimpleInventory implements IManaReceiver,
|
||||
}
|
||||
|
||||
public void renderHUD(Minecraft mc) {
|
||||
int xc = mc.mainWindow.getScaledWidth() / 2;
|
||||
int yc = mc.mainWindow.getScaledHeight() / 2;
|
||||
int xc = mc.getWindow().getScaledWidth() / 2;
|
||||
int yc = mc.getWindow().getScaledHeight() / 2;
|
||||
|
||||
float angle = -90;
|
||||
int radius = 24;
|
||||
|
||||
@@ -113,10 +113,10 @@ public class TileSpawnerClaw extends TileMod implements IManaReceiver, ITickable
|
||||
return;
|
||||
}
|
||||
|
||||
entity.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, world.rand.nextFloat() * 360.0F, 0.0F);
|
||||
entity.setLocationAndAngles(entity.getX(), entity.getY(), entity.getZ(), world.rand.nextFloat() * 360.0F, 0.0F);
|
||||
if (entity instanceof MobEntity) {
|
||||
MobEntity mobentity = (MobEntity)entity;
|
||||
if (!net.minecraftforge.event.ForgeEventFactory.canEntitySpawnSpawner(mobentity, world, (float)entity.posX, (float)entity.posY, (float)entity.posZ, logic)) {
|
||||
if (!net.minecraftforge.event.ForgeEventFactory.canEntitySpawnSpawner(mobentity, world, (float)entity.getX(), (float)entity.getY(), (float)entity.getZ(), logic)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.LazyLoadBase;
|
||||
import net.minecraft.util.LazyValue;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -47,7 +47,7 @@ public class TileTerraPlate extends TileMod implements ISparkAttachable, ITickab
|
||||
public static TileEntityType<TileTerraPlate> TYPE;
|
||||
public static final int MAX_MANA = TilePool.MAX_MANA / 2;
|
||||
|
||||
public static final LazyLoadBase<IMultiblock> MULTIBLOCK = new LazyLoadBase<>(() -> PatchouliAPI.instance.makeMultiblock(
|
||||
public static final LazyValue<IMultiblock> MULTIBLOCK = new LazyValue<>(() -> PatchouliAPI.instance.makeMultiblock(
|
||||
new String[][] {
|
||||
{
|
||||
"___",
|
||||
@@ -103,7 +103,7 @@ public class TileTerraPlate extends TileMod implements ISparkAttachable, ITickab
|
||||
if(otherItem != item)
|
||||
otherItem.remove();
|
||||
else item.setItem(new ItemStack(ModItems.terrasteel));
|
||||
world.playSound(null, item.posX, item.posY, item.posZ, ModSounds.terrasteelCraft, SoundCategory.BLOCKS, 1, 1);
|
||||
world.playSound(null, item.getX(), item.getY(), item.getZ(), ModSounds.terrasteelCraft, SoundCategory.BLOCKS, 1, 1);
|
||||
mana = 0;
|
||||
world.updateComparatorOutputLevel(pos, world.getBlockState(pos).getBlock());
|
||||
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(world, pos);
|
||||
|
||||
@@ -220,7 +220,7 @@ public class TileCorporeaIndex extends TileCorporeaBase implements ICorporeaRequ
|
||||
}
|
||||
|
||||
public static boolean isInRangeOfIndex(PlayerEntity player, TileCorporeaIndex index) {
|
||||
return player.dimension == index.world.getDimension().getType() && MathHelper.pointDistancePlane(index.getPos().getX() + 0.5, index.getPos().getZ() + 0.5, player.posX, player.posZ) < RADIUS && Math.abs(index.getPos().getY() + 0.5 - player.posY + (player.world.isRemote ? 0 : 1.6)) < 5;
|
||||
return player.dimension == index.world.getDimension().getType() && MathHelper.pointDistancePlane(index.getPos().getX() + 0.5, index.getPos().getZ() + 0.5, player.getX(), player.getZ()) < RADIUS && Math.abs(index.getPos().getY() + 0.5 - player.getY() + (player.world.isRemote ? 0 : 1.6)) < 5;
|
||||
}
|
||||
|
||||
public static void addPattern(String pattern, IRegexStacker stacker) {
|
||||
|
||||
@@ -388,7 +388,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
((ServerPlayerEntity) player).connection.sendPacket(new SUpdateTileEntityPacket(pos, -999, nbttagcompound));
|
||||
}
|
||||
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.ding, SoundCategory.PLAYERS, 0.11F, 1F);
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), ModSounds.ding, SoundCategory.PLAYERS, 0.11F, 1F);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -398,8 +398,8 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
int color = 0x4444FF;
|
||||
HUDHandler.drawSimpleManaHUD(color, knownMana, manaCap, name);
|
||||
|
||||
int x = Minecraft.getInstance().mainWindow.getScaledWidth() / 2 - 11;
|
||||
int y = Minecraft.getInstance().mainWindow.getScaledHeight() / 2 + 30;
|
||||
int x = Minecraft.getInstance().getWindow().getScaledWidth() / 2 - 11;
|
||||
int y = Minecraft.getInstance().getWindow().getScaledHeight() / 2 + 30;
|
||||
|
||||
int u = outputting ? 22 : 0;
|
||||
int v = 38;
|
||||
|
||||
@@ -391,7 +391,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
if(player instanceof ServerPlayerEntity)
|
||||
((ServerPlayerEntity) player).connection.sendPacket(new SUpdateTileEntityPacket(pos, -999, nbttagcompound));
|
||||
}
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.ding, SoundCategory.PLAYERS, 0.1F, 1);
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), ModSounds.ding, SoundCategory.PLAYERS, 0.1F, 1);
|
||||
} else {
|
||||
RayTraceResult pos = Item.rayTrace(world, player, RayTraceContext.FluidMode.ANY);
|
||||
if(pos instanceof BlockRayTraceResult && !world.isRemote) {
|
||||
@@ -559,8 +559,8 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
String lensName = lens.getDisplayName().getString();
|
||||
int width = 16 + mc.fontRenderer.getStringWidth(lensName) / 2;
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - width;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 + 50;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - width;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 + 50;
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(lensName, x + 20, y + 5, color);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
@@ -578,8 +578,8 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
if(!recieverStack.isEmpty()) {
|
||||
String stackName = recieverStack.getDisplayName().getString();
|
||||
int width = 16 + mc.fontRenderer.getStringWidth(stackName) / 2;
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - width;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 + 30;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - width;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 + 30;
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(stackName, x + 20, y + 5, color);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
@@ -791,9 +791,9 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
if(getIdentifier().equals(expectedIdentity)) {
|
||||
pingbackTicks = TICKS_ALLOWED_WITHOUT_PINGBACK;
|
||||
Entity e = (Entity) burst;
|
||||
lastPingbackX = e.posX;
|
||||
lastPingbackY = e.posY;
|
||||
lastPingbackZ = e.posZ;
|
||||
lastPingbackX = e.getX();
|
||||
lastPingbackY = e.getY();
|
||||
lastPingbackZ = e.getZ();
|
||||
setCanShoot(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,8 +96,8 @@ public class TileTurntable extends TileMod implements ITickableTileEntity {
|
||||
for(int i = 0; i < this.speed; i++)
|
||||
speed = speed + motion;
|
||||
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(speed) / 2;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 - 15;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(speed) / 2;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 - 15;
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
mc.fontRenderer.drawStringWithShadow(speed, x, y, color);
|
||||
|
||||
@@ -49,7 +49,7 @@ public final class PixieHandler {
|
||||
|
||||
if(Math.random() < chance) {
|
||||
EntityPixie pixie = new EntityPixie(player.world);
|
||||
pixie.setPosition(player.posX, player.posY + 2, player.posZ);
|
||||
pixie.setPosition(player.getX(), player.getY() + 2, player.getZ());
|
||||
|
||||
if(((ItemElementiumHelm) ModItems.elementiumHelm).hasArmorSet(player)) {
|
||||
pixie.setApplyPotionEffect(new EffectInstance(potions[event.getEntityLiving().world.rand.nextInt(potions.length)], 40, 0));
|
||||
|
||||
@@ -51,11 +51,11 @@ public class Vector3
|
||||
}
|
||||
|
||||
public static Vector3 fromEntity(Entity e) {
|
||||
return new Vector3(e.posX, e.posY, e.posZ);
|
||||
return new Vector3(e.getX(), e.getY(), e.getZ());
|
||||
}
|
||||
|
||||
public static Vector3 fromEntityCenter(Entity e) {
|
||||
return new Vector3(e.posX, e.posY - e.getYOffset() + e.getHeight() / 2, e.posZ);
|
||||
return new Vector3(e.getX(), e.getY() - e.getYOffset() + e.getHeight() / 2, e.getZ());
|
||||
}
|
||||
|
||||
public static Vector3 fromTileEntity(TileEntity e) {
|
||||
|
||||
@@ -61,7 +61,7 @@ import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.world.BossInfo;
|
||||
import net.minecraft.world.Difficulty;
|
||||
import net.minecraft.world.ServerBossInfo;
|
||||
import net.minecraft.world.server.ServerBossInfo;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
@@ -427,7 +427,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
}
|
||||
|
||||
playSound(SoundEvents.ENTITY_GENERIC_EXPLODE, 20F, (1F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
world.addParticle(ParticleTypes.EXPLOSION_EMITTER, posX, posY, posZ, 1D, 0D, 0D);
|
||||
world.addParticle(ParticleTypes.EXPLOSION_EMITTER, getX(), getY(), getZ(), 1D, 0D, 0D);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -469,18 +469,13 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
continue;
|
||||
|
||||
PlayerEntity saveLastAttacker = attackingPlayer;
|
||||
double savePosX = posX;
|
||||
double savePosY = posY;
|
||||
double savePosZ = posZ;
|
||||
Vec3d savePos = getPositionVec();
|
||||
|
||||
attackingPlayer = player; // Fake attacking player as the killer
|
||||
posX = player.posX; // Spoof pos so drops spawn at the player
|
||||
posY = player.posY;
|
||||
posZ = player.posZ;
|
||||
// Spoof pos so drops spawn at the player
|
||||
setPosition(player.getX(), player.getY(), player.getZ());
|
||||
super.dropLoot(DamageSource.causePlayerDamage(player), wasRecentlyHit);
|
||||
posX = savePosX;
|
||||
posY = savePosY;
|
||||
posZ = savePosZ;
|
||||
setPosition(savePos.getX(), savePos.getY(), savePos.getZ());
|
||||
attackingPlayer = saveLastAttacker;
|
||||
}
|
||||
|
||||
@@ -593,7 +588,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
}
|
||||
|
||||
private void keepInsideArena(PlayerEntity player) {
|
||||
if(vazkii.botania.common.core.helper.MathHelper.pointDistanceSpace(player.posX, player.posY, player.posZ, source.getX() + 0.5, source.getY() + 0.5, source.getZ() + 0.5) >= ARENA_RANGE) {
|
||||
if(vazkii.botania.common.core.helper.MathHelper.pointDistanceSpace(player.getX(), player.getY(), player.getZ(), source.getX() + 0.5, source.getY() + 0.5, source.getZ() + 0.5) >= ARENA_RANGE) {
|
||||
Vector3 sourceVector = new Vector3(source.getX() + 0.5, source.getY() + 0.5, source.getZ() + 0.5);
|
||||
Vector3 playerVector = Vector3.fromEntityCenter(player);
|
||||
Vector3 motion = sourceVector.subtract(playerVector).normalize();
|
||||
@@ -627,7 +622,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
for(int j = 0; j < 1 + world.rand.nextInt(hardMode ? 8 : 5); j++) {
|
||||
EntityPixie pixie = new EntityPixie(world);
|
||||
pixie.setProps(players.get(rand.nextInt(players.size())), this, 1, 8);
|
||||
pixie.setPosition(posX + getWidth() / 2, posY + 2, posZ + getWidth() / 2);
|
||||
pixie.setPosition(getX() + getWidth() / 2, getY() + 2, getZ() + getWidth() / 2);
|
||||
pixie.onInitialSpawn(world, world.getDifficultyForLocation(new BlockPos(pixie)),
|
||||
SpawnReason.MOB_SUMMONED, null, null);
|
||||
world.addEntity(pixie);
|
||||
@@ -641,8 +636,8 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
if(!entity.isImmuneToFire())
|
||||
entity.addPotionEffect(new EffectInstance(Effects.FIRE_RESISTANCE, 600, 0));
|
||||
float range = 6F;
|
||||
entity.setPosition(posX + 0.5 + Math.random() * range - range / 2, posY - 1,
|
||||
posZ + 0.5 + Math.random() * range - range / 2);
|
||||
entity.setPosition(getX() + 0.5 + Math.random() * range - range / 2, getY() - 1,
|
||||
getZ() + 0.5 + Math.random() * range - range / 2);
|
||||
entity.onInitialSpawn(world, world.getDifficultyForLocation(new BlockPos(entity)),
|
||||
SpawnReason.MOB_SUMMONED, null, null);
|
||||
if(entity instanceof WitherSkeletonEntity && hardMode) {
|
||||
@@ -676,7 +671,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
if(world.getDifficulty() == Difficulty.PEACEFUL)
|
||||
remove();
|
||||
|
||||
smashBlocksAround(MathHelper.floor(posX), MathHelper.floor(posY), MathHelper.floor(posZ), 1);
|
||||
smashBlocksAround(MathHelper.floor(getX()), MathHelper.floor(getY()), MathHelper.floor(getZ()), 1);
|
||||
|
||||
List<PlayerEntity> players = getPlayersAround();
|
||||
|
||||
@@ -692,7 +687,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
}
|
||||
|
||||
//also see SleepingHandler
|
||||
if(player.isSleeping()) player.wakeUpPlayer(true, true, false);
|
||||
if(player.isSleeping()) player.wakeUp(true, true);
|
||||
|
||||
clearPotions(player);
|
||||
keepInsideArena(player);
|
||||
@@ -752,7 +747,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
int count = dying && hardMode ? 7 : 6;
|
||||
for(int i = 0; i < count; i++) {
|
||||
int x = source.getX() - 10 + rand.nextInt(20);
|
||||
int y = (int) players.get(rand.nextInt(players.size())).posY;
|
||||
int y = (int) players.get(rand.nextInt(players.size())).getY();
|
||||
int z = source.getZ() - 10 + rand.nextInt(20);
|
||||
|
||||
EntityMagicLandmine landmine = new EntityMagicLandmine(world);
|
||||
@@ -767,7 +762,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
for(int i = 0; i < (spawnPixies ? world.rand.nextInt(hardMode ? 6 : 3) : 1); i++) {
|
||||
EntityPixie pixie = new EntityPixie(world);
|
||||
pixie.setProps(players.get(rand.nextInt(players.size())), this, 1, 8);
|
||||
pixie.setPosition(posX + getWidth() / 2, posY + 2, posZ + getWidth() / 2);
|
||||
pixie.setPosition(getX() + getWidth() / 2, getY() + 2, getZ() + getWidth() / 2);
|
||||
pixie.onInitialSpawn(world, world.getDifficultyForLocation(new BlockPos(pixie)),
|
||||
SpawnReason.MOB_SUMMONED, null, null);
|
||||
world.addEntity(pixie);
|
||||
@@ -817,7 +812,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
|
||||
private void spawnMissile() {
|
||||
EntityMagicMissile missile = new EntityMagicMissile(this, true);
|
||||
missile.setPosition(posX + (Math.random() - 0.5 * 0.1), posY + 2.4 + (Math.random() - 0.5 * 0.1), posZ + (Math.random() - 0.5 * 0.1));
|
||||
missile.setPosition(getX() + (Math.random() - 0.5 * 0.1), getY() + 2.4 + (Math.random() - 0.5 * 0.1), getZ() + (Math.random() - 0.5 * 0.1));
|
||||
if(missile.findTarget()) {
|
||||
playSound(ModSounds.missile, 0.6F, 0.8F + (float) Math.random() * 0.2F);
|
||||
world.addEntity(missile);
|
||||
@@ -826,7 +821,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
|
||||
private void teleportRandomly() {
|
||||
//choose a location to teleport to
|
||||
double oldX = posX, oldY = posY, oldZ = posZ;
|
||||
double oldX = getX(), oldY = getY(), oldZ = getZ();
|
||||
double newX, newY = source.getY(), newZ;
|
||||
int tries = 0;
|
||||
|
||||
@@ -937,7 +932,6 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
ItemStack stack = new ItemStack(Items.PLAYER_HEAD);
|
||||
mc.textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
mc.getItemRenderer().renderItemIntoGUI(stack, px, py);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
@@ -967,19 +961,19 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
|
||||
public ShaderCallback getBossBarShaderCallback(boolean background, int shader) {
|
||||
if(shaderCallback == null)
|
||||
shaderCallback = shader1 -> {
|
||||
int grainIntensityUniform = GLX.glGetUniformLocation(shader1, "grainIntensity");
|
||||
int hpFractUniform = GLX.glGetUniformLocation(shader1, "hpFract");
|
||||
int grainIntensityUniform = GlStateManager.getUniformLocation(shader1, "grainIntensity");
|
||||
int hpFractUniform = GlStateManager.getUniformLocation(shader1, "hpFract");
|
||||
|
||||
float time = getInvulTime();
|
||||
float grainIntensity = time > 20 ? 1F : Math.max(hardMode ? 0.5F : 0F, time / 20F);
|
||||
|
||||
ShaderHelper.FLOAT_BUF.position(0);
|
||||
ShaderHelper.FLOAT_BUF.put(0, grainIntensity);
|
||||
GLX.glUniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
|
||||
GlStateManager.uniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
|
||||
|
||||
ShaderHelper.FLOAT_BUF.position(0);
|
||||
ShaderHelper.FLOAT_BUF.put(0, getHealth() / getMaxHealth());
|
||||
GLX.glUniform1(hpFractUniform, ShaderHelper.FLOAT_BUF);
|
||||
GlStateManager.uniform1(hpFractUniform, ShaderHelper.FLOAT_BUF);
|
||||
};
|
||||
|
||||
return background ? null : shaderCallback;
|
||||
|
||||
@@ -92,7 +92,7 @@ public class EntityFlameRing extends Entity {
|
||||
return;
|
||||
|
||||
for(LivingEntity entity : entities) {
|
||||
if(entity == null || MathHelper.pointDistancePlane(posX, posY, entity.posX, entity.posY) > radius)
|
||||
if(entity == null || MathHelper.pointDistancePlane(posX, posY, entity.getX(), entity.getY()) > radius)
|
||||
continue;
|
||||
|
||||
entity.setFire(4);
|
||||
|
||||
@@ -132,9 +132,9 @@ public class EntityMagicMissile extends ThrowableEntity {
|
||||
LivingEntity target = getTargetEntity();
|
||||
if(target != null) {
|
||||
if(lockY == -1) {
|
||||
lockX = target.posX;
|
||||
lockY = target.posY;
|
||||
lockZ = target.posZ;
|
||||
lockX = target.getX();
|
||||
lockY = target.getY();
|
||||
lockZ = target.getZ();
|
||||
}
|
||||
|
||||
Vector3 targetVec = evil ? new Vector3(lockX, lockY, lockZ) : Vector3.fromEntityCenter(target);
|
||||
|
||||
@@ -162,9 +162,9 @@ public class EntityManaBurst extends ThrowableEntity implements IManaBurst {
|
||||
}
|
||||
|
||||
private void superUpdate() {
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
this.lastTickPosX = this.getX();
|
||||
this.lastTickPosY = this.getY();
|
||||
this.lastTickPosZ = this.getZ();
|
||||
// Botania - inline supersuperclass.tick()
|
||||
{
|
||||
if (!this.world.isRemote) {
|
||||
@@ -219,9 +219,9 @@ public class EntityManaBurst extends ThrowableEntity implements IManaBurst {
|
||||
}
|
||||
|
||||
Vec3d vec3d = this.getMotion();
|
||||
this.posX += vec3d.x;
|
||||
this.posY += vec3d.y;
|
||||
this.posZ += vec3d.z;
|
||||
this.getX() += vec3d.x;
|
||||
this.getY() += vec3d.y;
|
||||
this.getZ() += vec3d.z;
|
||||
float f = MathHelper.sqrt(horizontalMag(vec3d));
|
||||
this.rotationYaw = (float)(MathHelper.atan2(vec3d.x, vec3d.z) * (double)(180F / (float)Math.PI));
|
||||
|
||||
@@ -247,7 +247,7 @@ public class EntityManaBurst extends ThrowableEntity implements IManaBurst {
|
||||
if (this.isInWater()) {
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
float f2 = 0.25F;
|
||||
this.world.addParticle(ParticleTypes.BUBBLE, this.posX - vec3d.x * 0.25D, this.posY - vec3d.y * 0.25D, this.posZ - vec3d.z * 0.25D, vec3d.x, vec3d.y, vec3d.z);
|
||||
this.world.addParticle(ParticleTypes.BUBBLE, this.getX() - vec3d.x * 0.25D, this.getY() - vec3d.y * 0.25D, this.getZ() - vec3d.z * 0.25D, vec3d.x, vec3d.y, vec3d.z);
|
||||
}
|
||||
|
||||
f1 = 0.8F;
|
||||
@@ -261,7 +261,7 @@ public class EntityManaBurst extends ThrowableEntity implements IManaBurst {
|
||||
this.setMotion(vec3d1.x, vec3d1.y - (double)this.getGravityVelocity(), vec3d1.z);
|
||||
}
|
||||
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.setPosition(this.getX(), this.getY(), this.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -793,9 +793,9 @@ public class EntityManaBurst extends ThrowableEntity implements IManaBurst {
|
||||
public boolean invalid = false;
|
||||
|
||||
public PositionProperties(Entity entity) {
|
||||
int x = MathHelper.floor(entity.posX);
|
||||
int y = MathHelper.floor(entity.posY);
|
||||
int z = MathHelper.floor(entity.posZ);
|
||||
int x = MathHelper.floor(entity.getX());
|
||||
int y = MathHelper.floor(entity.getY());
|
||||
int z = MathHelper.floor(entity.getZ());
|
||||
coords = new BlockPos(x, y, z);
|
||||
state = entity.world.getBlockState(coords);
|
||||
}
|
||||
|
||||
@@ -67,14 +67,14 @@ public class EntityManaStorm extends Entity {
|
||||
deathTime++;
|
||||
if(deathTime >= DEATH_TIME) {
|
||||
remove();
|
||||
world.createExplosion(this, posX, posY, posZ, 8F, true, Explosion.Mode.DESTROY);
|
||||
world.createExplosion(this, getX(), getY(), getZ(), 8F, true, Explosion.Mode.DESTROY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnBurst() {
|
||||
EntityManaBurst burst = new EntityManaBurst(world);
|
||||
burst.setPosition(posX, posY, posZ);
|
||||
burst.setPosition(getX(), getY(), getZ());
|
||||
|
||||
float motionModifier = 0.5F;
|
||||
burst.setColor(0x20FF20);
|
||||
|
||||
@@ -82,25 +82,25 @@ public class EntityPinkWither extends WitherEntity {
|
||||
|
||||
private double getHeadX(int p_82214_1_) {
|
||||
if (p_82214_1_ <= 0) {
|
||||
return this.posX;
|
||||
return this.getX();
|
||||
} else {
|
||||
float f = (this.renderYawOffset + (float)(180 * (p_82214_1_ - 1))) * ((float)Math.PI / 180F);
|
||||
float f1 = MathHelper.cos(f);
|
||||
return this.posX + (double)f1 * 1.3D;
|
||||
return this.getX() + (double)f1 * 1.3D;
|
||||
}
|
||||
}
|
||||
|
||||
private double getHeadY(int p_82208_1_) {
|
||||
return p_82208_1_ <= 0 ? this.posY + 3.0D : this.posY + 2.2D;
|
||||
return p_82208_1_ <= 0 ? this.getY() + 3.0D : this.getY() + 2.2D;
|
||||
}
|
||||
|
||||
private double getHeadZ(int p_82213_1_) {
|
||||
if (p_82213_1_ <= 0) {
|
||||
return this.posZ;
|
||||
return this.getZ();
|
||||
} else {
|
||||
float f = (this.renderYawOffset + (float)(180 * (p_82213_1_ - 1))) * ((float)Math.PI / 180F);
|
||||
float f1 = MathHelper.sin(f);
|
||||
return this.posZ + (double)f1 * 1.3D;
|
||||
return this.getZ() + (double)f1 * 1.3D;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,9 +87,9 @@ public class EntityPixie extends FlyingEntity {
|
||||
protected void updateAITasks() {
|
||||
LivingEntity target = getAttackTarget();
|
||||
if(target != null) {
|
||||
double d0 = target.posX + target.getWidth() / 2 - posX;
|
||||
double d1 = target.posY + target.getHeight() / 2 - posY;
|
||||
double d2 = target.posZ + target.getWidth() / 2 - posZ;
|
||||
double d0 = target.getX() + target.getWidth() / 2 - posX;
|
||||
double d1 = target.getY() + target.getHeight() / 2 - posY;
|
||||
double d2 = target.getZ() + target.getWidth() / 2 - posZ;
|
||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||
|
||||
float mod = 0.45F;
|
||||
|
||||
@@ -123,9 +123,9 @@ public class EntityPoolMinecart extends AbstractMinecartEntity {
|
||||
if(world.isRemote) {
|
||||
double particleChance = 1F - (double) getMana() / (double) TilePool.MAX_MANA * 0.1;
|
||||
Color color = TilePool.PARTICLE_COLOR;
|
||||
double x = MathHelper.floor(posX);
|
||||
double y = MathHelper.floor(posY);
|
||||
double z = MathHelper.floor(posZ);
|
||||
double x = MathHelper.floor(getX());
|
||||
double y = MathHelper.floor(getY());
|
||||
double z = MathHelper.floor(getZ());
|
||||
if(Math.random() > particleChance) {
|
||||
WispParticleData data = WispParticleData.wisp((float) Math.random() / 3F, (float) color.getRed(), color.getGreen() / 255F, color.getBlue() / 255F, 2F);
|
||||
world.addParticle(data, x + 0.3 + Math.random() * 0.5, y + 0.85 + Math.random() * 0.25, z + Math.random(), 0, (float) Math.random() / 25F, 0);
|
||||
|
||||
@@ -223,7 +223,7 @@ public class EntitySpark extends EntitySparkBase implements ISparkEntity {
|
||||
public static void particleBeam(PlayerEntity player, Entity e1, Entity e2) {
|
||||
if(e1 != null && e2 != null && !e1.world.isRemote) {
|
||||
PacketHandler.sendTo((ServerPlayerEntity) player,
|
||||
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.SPARK_NET_INDICATOR, e1.posX, e1.posY, e1.posZ,
|
||||
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.SPARK_NET_INDICATOR, e1.getX(), e1.getY(), e1.getZ(),
|
||||
e1.getEntityId(), e2.getEntityId()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
}
|
||||
|
||||
protected EntityThrowableCopy(EntityType<? extends EntityThrowableCopy> type, LivingEntity livingEntityIn, World worldIn) {
|
||||
this(type, livingEntityIn.posX, livingEntityIn.posY + (double)livingEntityIn.getEyeHeight() - (double)0.1F, livingEntityIn.posZ, worldIn);
|
||||
this(type, livingEntityIn.getX(), livingEntityIn.getY() + (double)livingEntityIn.getEyeHeight() - (double)0.1F, livingEntityIn.getZ(), worldIn);
|
||||
this.owner = livingEntityIn;
|
||||
this.ownerId = livingEntityIn.getUniqueID();
|
||||
}
|
||||
@@ -110,9 +110,9 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
public void tick() {
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
this.lastTickPosX = this.getX();
|
||||
this.lastTickPosY = this.getY();
|
||||
this.lastTickPosZ = this.getZ();
|
||||
super.tick();
|
||||
if (this.throwableShake > 0) {
|
||||
--this.throwableShake;
|
||||
@@ -156,9 +156,9 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
}
|
||||
|
||||
Vec3d vec3d = this.getMotion();
|
||||
this.posX += vec3d.x;
|
||||
this.posY += vec3d.y;
|
||||
this.posZ += vec3d.z;
|
||||
this.getX() += vec3d.x;
|
||||
this.getY() += vec3d.y;
|
||||
this.getZ() += vec3d.z;
|
||||
float f = MathHelper.sqrt(horizontalMag(vec3d));
|
||||
this.rotationYaw = (float)(MathHelper.atan2(vec3d.x, vec3d.z) * (double)(180F / (float)Math.PI));
|
||||
|
||||
@@ -184,7 +184,7 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
if (this.isInWater()) {
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
float f2 = 0.25F;
|
||||
this.world.addParticle(ParticleTypes.BUBBLE, this.posX - vec3d.x * 0.25D, this.posY - vec3d.y * 0.25D, this.posZ - vec3d.z * 0.25D, vec3d.x, vec3d.y, vec3d.z);
|
||||
this.world.addParticle(ParticleTypes.BUBBLE, this.getX() - vec3d.x * 0.25D, this.getY() - vec3d.y * 0.25D, this.getZ() - vec3d.z * 0.25D, vec3d.x, vec3d.y, vec3d.z);
|
||||
}
|
||||
|
||||
f1 = 0.8F;
|
||||
@@ -198,7 +198,7 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
this.setMotion(vec3d1.x, vec3d1.y - (double)this.getGravityVelocity(), vec3d1.z);
|
||||
}
|
||||
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.setPosition(this.getX(), this.getY(), this.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -116,7 +116,7 @@ public class CurioIntegration extends EquipmentHandler {
|
||||
|
||||
@Override
|
||||
public void playEquipSound(LivingEntity entity) {
|
||||
entity.world.playSound(null, entity.posX, entity.posY, entity.posZ, ModSounds.equipBauble, entity.getSoundCategory(), 0.1F, 1.3F);
|
||||
entity.world.playSound(null, entity.getX(), entity.getY(), entity.getZ(), ModSounds.equipBauble, entity.getSoundCategory(), 0.1F, 1.3F);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -90,10 +90,10 @@ public class ItemAstrolabe extends ItemMod {
|
||||
ItemsRemainingRenderHandler.set(stack, newSize + "x" + newSize);
|
||||
worldIn.playSound(playerIn, playerIn.getPosition(), SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP, SoundCategory.PLAYERS, 0.5F, 1F);
|
||||
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.PASS, stack);
|
||||
return ActionResult.pass(stack);
|
||||
}
|
||||
|
||||
public boolean placeAllBlocks(ItemStack stack, PlayerEntity player) {
|
||||
|
||||
@@ -93,6 +93,6 @@ public class ItemBaubleBox extends ItemMod {
|
||||
b.writeBoolean(hand == Hand.MAIN_HAND);
|
||||
});
|
||||
}
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, player.getHeldItem(hand));
|
||||
return ActionResult.success(player.getHeldItem(hand));
|
||||
}
|
||||
}
|
||||
@@ -64,10 +64,10 @@ public class ItemBlackHoleTalisman extends ItemMod implements IBlockProvider {
|
||||
if(getBlock(stack) != null && player.isSneaking()) {
|
||||
ItemNBTHelper.setBoolean(stack, TAG_ACTIVE, !ItemNBTHelper.getBoolean(stack, TAG_ACTIVE, false));
|
||||
player.playSound(SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP, 0.3F, 0.1F);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.PASS, stack);
|
||||
return ActionResult.pass(stack);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ItemBlackLotus extends ItemMod implements IManaDissolvable {
|
||||
pool.recieveMana(t2 ? MANA_PER_T2 : MANA_PER);
|
||||
stack.shrink(1);
|
||||
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(item.world, tile.getPos());
|
||||
PacketHandler.sendToNearby(item.world, item, new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.BLACK_LOTUS_DISSOLVE, item.posX, tile.getPos().getY() + 0.5, item.posZ));
|
||||
PacketHandler.sendToNearby(item.world, item, new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.BLACK_LOTUS_DISSOLVE, item.getX(), tile.getPos().getY() + 0.5, item.getZ()));
|
||||
}
|
||||
|
||||
item.playSound(ModSounds.blackLotus, 0.5F, t2 ? 0.1F : 1F);
|
||||
|
||||
@@ -75,8 +75,8 @@ public class ItemBottledMana extends ItemMod {
|
||||
}
|
||||
case 3 : { // Mini Explosion
|
||||
if(!living.world.isRemote)
|
||||
living.world.createExplosion(null, living.posX, living.posY,
|
||||
living.posZ, 0.25F, Explosion.Mode.NONE);
|
||||
living.world.createExplosion(null, living.getX(), living.getY(),
|
||||
living.getZ(), 0.25F, Explosion.Mode.NONE);
|
||||
break;
|
||||
}
|
||||
case 4 : { // Mega Jump
|
||||
@@ -120,14 +120,14 @@ public class ItemBottledMana extends ItemMod {
|
||||
break;
|
||||
}
|
||||
case 9 : { // Highest Possible
|
||||
int x = MathHelper.floor(living.posX);
|
||||
int z = MathHelper.floor(living.posZ);
|
||||
int x = MathHelper.floor(living.getX());
|
||||
int z = MathHelper.floor(living.getZ());
|
||||
for(int i = 256; i > 0; i--) {
|
||||
Block block = living.world.getBlockState(new BlockPos(x, i, z)).getBlock();
|
||||
if(!block.isAir(living.world.getBlockState(new BlockPos(x, i, z)), living.world, new BlockPos(x, i, z))) {
|
||||
if(living instanceof ServerPlayerEntity) {
|
||||
ServerPlayerEntity mp = (ServerPlayerEntity) living;
|
||||
mp.connection.setPlayerLocation(living.posX, i, living.posZ, living.rotationYaw, living.rotationPitch);
|
||||
mp.connection.setPlayerLocation(living.getX(), i, living.getZ(), living.rotationYaw, living.rotationPitch);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -148,14 +148,14 @@ public class ItemBottledMana extends ItemMod {
|
||||
case 12 : { // Flare
|
||||
if(!living.world.isRemote) {
|
||||
EntitySignalFlare flare = new EntitySignalFlare(living.world);
|
||||
flare.setPosition(living.posX, living.posY, living.posZ);
|
||||
flare.setPosition(living.getX(), living.getY(), living.getZ());
|
||||
flare.setColor(living.world.rand.nextInt(16));
|
||||
flare.playSound(SoundEvents.ENTITY_GENERIC_EXPLODE, 40F, (1.0F + (living.world.rand.nextFloat() - living.world.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
|
||||
living.world.addEntity(flare);
|
||||
|
||||
int range = 5;
|
||||
List<LivingEntity> entities = living.world.getEntitiesWithinAABB(LivingEntity.class, new AxisAlignedBB(living.posX - range, living.posY - range, living.posZ - range, living.posX + range, living.posY + range, living.posZ + range));
|
||||
List<LivingEntity> entities = living.world.getEntitiesWithinAABB(LivingEntity.class, new AxisAlignedBB(living.getX() - range, living.getY() - range, living.getZ() - range, living.getX() + range, living.getY() + range, living.getZ() + range));
|
||||
for(LivingEntity entity : entities)
|
||||
if(entity != living && (!(entity instanceof PlayerEntity) || ServerLifecycleHooks.getCurrentServer() == null || ServerLifecycleHooks.getCurrentServer().isPVPEnabled()))
|
||||
entity.addPotionEffect(new EffectInstance(Effects.SLOWNESS, 50, 5));
|
||||
@@ -166,7 +166,7 @@ public class ItemBottledMana extends ItemMod {
|
||||
case 13 : { // Pixie Friend
|
||||
if(!living.world.isRemote) {
|
||||
EntityPixie pixie = new EntityPixie(living.world);
|
||||
pixie.setPosition(living.posX, living.posY + 1.5, living.posZ);
|
||||
pixie.setPosition(living.getX(), living.getY() + 1.5, living.getZ());
|
||||
living.world.addEntity(pixie);
|
||||
}
|
||||
break;
|
||||
@@ -218,7 +218,7 @@ public class ItemBottledMana extends ItemMod {
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, @Nonnull Hand hand) {
|
||||
player.setActiveHand(hand);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, player.getHeldItem(hand));
|
||||
return ActionResult.success(player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -132,13 +132,13 @@ public class ItemCacophonium extends ItemMod {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(getSound(stack) != null)
|
||||
player.setActiveHand(hand);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, LivingEntity player, int count) {
|
||||
if(count % (isDOIT(stack) ? 20 : 6) == 0)
|
||||
playSound(player.world, stack, player.posX, player.posY, player.posZ, SoundCategory.PLAYERS, 0.9F);
|
||||
playSound(player.world, stack, player.getX(), player.getY(), player.getZ(), SoundCategory.PLAYERS, 0.9F);
|
||||
}
|
||||
|
||||
public static void playSound(World world, ItemStack stack, double x, double y, double z, SoundCategory category, float volume) {
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ItemCraftingHalo extends ItemMod {
|
||||
}
|
||||
|
||||
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
public static IItemHandler getFakeInv(PlayerEntity player) {
|
||||
@@ -417,9 +417,9 @@ public class ItemCraftingHalo extends ItemMod {
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
float alpha = ((float) Math.sin((ClientTickHandler.ticksInGame + partialTicks) * 0.2F) * 0.5F + 0.5F) * 0.4F + 0.3F;
|
||||
|
||||
double posX = player.prevPosX + (player.posX - player.prevPosX) * partialTicks;
|
||||
double posY = player.prevPosY + (player.posY - player.prevPosY) * partialTicks;
|
||||
double posZ = player.prevPosZ + (player.posZ - player.prevPosZ) * partialTicks;
|
||||
double posX = player.prevPosX + (player.getX() - player.prevPosX) * partialTicks;
|
||||
double posY = player.prevPosY + (player.getY() - player.prevPosY) * partialTicks;
|
||||
double posZ = player.prevPosZ + (player.getZ() - player.prevPosZ) * partialTicks;
|
||||
|
||||
GlStateManager.translated(posX - renderPosX, posY - renderPosY + player.getEyeHeight(), posZ - renderPosZ);
|
||||
|
||||
@@ -520,14 +520,14 @@ public class ItemCraftingHalo extends ItemMod {
|
||||
if(slot == 0) {
|
||||
String name = craftingTable.getDisplayName().getString();
|
||||
int l = mc.fontRenderer.getStringWidth(name);
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - l / 2;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 - 65;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - l / 2;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 - 65;
|
||||
|
||||
AbstractGui.fill(x - 6, y - 6, x + l + 6, y + 37, 0x22000000);
|
||||
AbstractGui.fill(x - 4, y - 4, x + l + 4, y + 35, 0x22000000);
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(craftingTable, mc.mainWindow.getScaledWidth() / 2 - 8, mc.mainWindow.getScaledHeight() / 2 - 52);
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(craftingTable, mc.getWindow().getScaledWidth() / 2 - 8, mc.getWindow().getScaledHeight() / 2 - 52);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(name, x, y, 0xFFFFFF);
|
||||
@@ -552,8 +552,8 @@ public class ItemCraftingHalo extends ItemMod {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
|
||||
if(!recipe[9].isEmpty()) {
|
||||
int x = mc.mainWindow.getScaledWidth() / 2 - 45;
|
||||
int y = mc.mainWindow.getScaledHeight() / 2 - 90;
|
||||
int x = mc.getWindow().getScaledWidth() / 2 - 45;
|
||||
int y = mc.getWindow().getScaledHeight() / 2 - 90;
|
||||
|
||||
AbstractGui.fill(x - 6, y - 6, x + 90 + 6, y + 60, 0x22000000);
|
||||
AbstractGui.fill(x - 4, y - 4, x + 90 + 4, y + 58, 0x22000000);
|
||||
@@ -583,10 +583,10 @@ public class ItemCraftingHalo extends ItemMod {
|
||||
int yoff = 110;
|
||||
if(setRecipe && !canCraft(recipe, getFakeInv(player))) {
|
||||
String warning = TextFormatting.RED + I18n.format("botaniamisc.cantCraft");
|
||||
mc.fontRenderer.drawStringWithShadow(warning, mc.mainWindow.getScaledWidth() / 2.0F - mc.fontRenderer.getStringWidth(warning) / 2.0F, mc.mainWindow.getScaledHeight() / 2.0F - yoff, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(warning, mc.getWindow().getScaledWidth() / 2.0F - mc.fontRenderer.getStringWidth(warning) / 2.0F, mc.getWindow().getScaledHeight() / 2.0F - yoff, 0xFFFFFF);
|
||||
yoff += 12;
|
||||
}
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(label.getFormattedText(), mc.mainWindow.getScaledWidth() / 2.0F - mc.fontRenderer.getStringWidth(label.getString()) / 2.0F, mc.mainWindow.getScaledHeight() / 2.0F - yoff, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(label.getFormattedText(), mc.getWindow().getScaledWidth() / 2.0F - mc.fontRenderer.getStringWidth(label.getString()) / 2.0F, mc.getWindow().getScaledHeight() / 2.0F - yoff, 0xFFFFFF);
|
||||
}
|
||||
}
|
||||
@@ -53,9 +53,9 @@ public class ItemEnderHand extends ItemMod implements IManaUsingItem, IBlockProv
|
||||
ManaItemHandler.requestManaExact(stack, player, COST_SELF, true);
|
||||
}
|
||||
player.playSound(SoundEvents.BLOCK_ENDER_CHEST_OPEN, 1F, 1F);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
return ActionResult.newResult(ActionResultType.PASS, stack);
|
||||
return ActionResult.pass(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -112,7 +112,7 @@ public class ItemFlowerBag extends ItemMod {
|
||||
if(numPickedUp > 0) {
|
||||
event.setCanceled(true);
|
||||
if (!event.getItem().isSilent()) {
|
||||
event.getItem().world.playSound(null, event.getEntityPlayer().posX, event.getEntityPlayer().posY, event.getEntityPlayer().posZ,
|
||||
event.getItem().world.playSound(null, event.getEntityPlayer().getX(), event.getEntityPlayer().getY(), event.getEntityPlayer().getZ(),
|
||||
SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, 0.2F,
|
||||
((event.getItem().world.rand.nextFloat() - event.getItem().world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
|
||||
}
|
||||
@@ -136,7 +136,7 @@ public class ItemFlowerBag extends ItemMod {
|
||||
buf.writeBoolean(hand == Hand.MAIN_HAND);
|
||||
});
|
||||
}
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, player.getHeldItem(hand));
|
||||
return ActionResult.success(player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ItemHorn extends ItemMod {
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, @Nonnull Hand hand) {
|
||||
player.setActiveHand(hand);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, player.getHeldItem(hand));
|
||||
return ActionResult.success(player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,7 +68,7 @@ public class ItemHorn extends ItemMod {
|
||||
if(!player.world.isRemote) {
|
||||
if(time != getUseDuration(stack) && time % 5 == 0)
|
||||
breakGrass(player.world, stack, new BlockPos(player));
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_NOTE_BLOCK_BASS, SoundCategory.BLOCKS, 1F, 0.001F);
|
||||
player.world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.BLOCK_NOTE_BLOCK_BASS, SoundCategory.BLOCKS, 1F, 0.001F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -199,9 +199,9 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet
|
||||
|
||||
public EntityManaBurst getBurst(World world, BlockPos pos, ItemStack stack) {
|
||||
EntityManaBurst burst = new EntityManaBurst(world);
|
||||
burst.posX = pos.getX() + 0.5;
|
||||
burst.posY = pos.getY() + 0.5;
|
||||
burst.posZ = pos.getZ() + 0.5;
|
||||
burst.getX() = pos.getX() + 0.5;
|
||||
burst.getY() = pos.getY() + 0.5;
|
||||
burst.getZ() = pos.getZ() + 0.5;
|
||||
|
||||
burst.setColor(0x00EAFF);
|
||||
burst.setMana(1);
|
||||
@@ -244,9 +244,9 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet
|
||||
if(y != -1)
|
||||
spawnBurst(entity.world, new BlockPos(x, y, z), lens);
|
||||
} else if(burst.getTicksExisted() == placeTicks) {
|
||||
int x = net.minecraft.util.math.MathHelper.floor(entity.posX);
|
||||
int x = net.minecraft.util.math.MathHelper.floor(entity.getX());
|
||||
int y = ItemNBTHelper.getInt(lens, TAG_Y_START, -1) + targetDistance;
|
||||
int z = net.minecraft.util.math.MathHelper.floor(entity.posZ);
|
||||
int z = net.minecraft.util.math.MathHelper.floor(entity.getZ());
|
||||
BlockPos pos = new BlockPos(x, y, z);
|
||||
|
||||
if(entity.world.isAirBlock(pos)) {
|
||||
@@ -278,7 +278,7 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet
|
||||
ThrowableEntity entity = (ThrowableEntity) burst;
|
||||
ItemStack lens = burst.getSourceLens();
|
||||
BlockState state = NBTUtil.readBlockState(lens.getOrCreateTag().getCompound(TAG_STATE));
|
||||
entity.world.addParticle(new BlockParticleData(ParticleTypes.BLOCK, state), entity.posX, entity.posY, entity.posZ,
|
||||
entity.world.addParticle(new BlockParticleData(ParticleTypes.BLOCK, state), entity.getX(), entity.getY(), entity.getZ(),
|
||||
entity.getMotion().getX(), entity.getMotion().getY(), entity.getMotion().getZ());
|
||||
|
||||
return true;
|
||||
|
||||
@@ -89,10 +89,10 @@ public class ItemLexicon extends ItemMod implements IElvenItem {
|
||||
|
||||
if(playerIn instanceof ServerPlayerEntity) {
|
||||
ServerPlayerEntity player= (ServerPlayerEntity) playerIn;
|
||||
UseItemSuccessTrigger.INSTANCE.trigger(player, stack, player.getServerWorld(), player.posX, player.posY, player.posZ);
|
||||
UseItemSuccessTrigger.INSTANCE.trigger(player, stack, player.getServerWorld(), player.getX(), player.getY(), player.getZ());
|
||||
NetworkHandler.sendToPlayer(new MessageOpenBookGui(book.resourceLoc.toString()), (ServerPlayerEntity) playerIn);
|
||||
SoundEvent sfx = PatchouliSounds.getSound(book.openSound, PatchouliSounds.book_open);
|
||||
worldIn.playSound(null, playerIn.posX, playerIn.posY, playerIn.posZ, sfx, SoundCategory.PLAYERS, 1F, (float) (0.7 + Math.random() * 0.4));
|
||||
worldIn.playSound(null, playerIn.getX(), playerIn.getY(), playerIn.getZ(), sfx, SoundCategory.PLAYERS, 1F, (float) (0.7 + Math.random() * 0.4));
|
||||
}
|
||||
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, stack);
|
||||
|
||||
@@ -77,31 +77,31 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem {
|
||||
|
||||
if(player.isSneaking() && hasClip(stack)) {
|
||||
rotatePos(stack);
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.PLAYERS, 0.6F, (1.0F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.PLAYERS, 0.6F, (1.0F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
if(world.isRemote)
|
||||
player.swingArm(hand);
|
||||
ItemStack lens = getLens(stack);
|
||||
ItemsRemainingRenderHandler.set(lens, -2);
|
||||
stack.setDamage(effCd);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
} else if(stack.getDamage() == 0) {
|
||||
EntityManaBurst burst = getBurst(player, stack, true, hand);
|
||||
if(burst != null && ManaItemHandler.requestManaExact(stack, player, burst.getMana(), true)) {
|
||||
if(!world.isRemote) {
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.manaBlaster, SoundCategory.PLAYERS, 0.6F, 1);
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), ModSounds.manaBlaster, SoundCategory.PLAYERS, 0.6F, 1);
|
||||
world.addEntity(burst);
|
||||
UseItemSuccessTrigger.INSTANCE.trigger((ServerPlayerEntity) player, stack, (ServerWorld) world, player.posX, player.posY, player.posZ);
|
||||
UseItemSuccessTrigger.INSTANCE.trigger((ServerPlayerEntity) player, stack, (ServerWorld) world, player.getX(), player.getY(), player.getZ());
|
||||
} else {
|
||||
player.swingArm(hand);
|
||||
player.setMotion(player.getMotion().subtract(burst.getMotion().mul(0.1, 0.3, 0.1)));
|
||||
}
|
||||
stack.setDamage(effCd);
|
||||
} else if(!world.isRemote)
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_LEVER_CLICK, SoundCategory.PLAYERS, 0.6F, (1.0F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.BLOCK_LEVER_CLICK, SoundCategory.PLAYERS, 0.6F, (1.0F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.PASS, stack);
|
||||
return ActionResult.pass(stack);
|
||||
}
|
||||
|
||||
// ASADA-SAN ASADA-SAN ASADA-SAN ASADA-SAN ASADA-SAN ASADA-SAN ASADA-SAN ASADA-SAN
|
||||
|
||||
@@ -87,7 +87,7 @@ public class ItemManaMirror extends ItemMod implements IManaItem, ICoordBoundIte
|
||||
TileEntity tile = world.getTileEntity(ctx.getPos());
|
||||
if(tile instanceof IManaPool) {
|
||||
bindPool(ctx.getItem(), tile);
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.ding, SoundCategory.PLAYERS, 1F, 1F);
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), ModSounds.ding, SoundCategory.PLAYERS, 1F, 1F);
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,12 +46,12 @@ public class ItemPinkinator extends ItemMod {
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, @Nonnull Hand hand) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
int range = 16;
|
||||
List<WitherEntity> withers = world.getEntitiesWithinAABB(WitherEntity.class, new AxisAlignedBB(player.posX - range, player.posY - range, player.posZ - range, player.posX + range, player.posY + range, player.posZ + range));
|
||||
List<WitherEntity> withers = world.getEntitiesWithinAABB(WitherEntity.class, new AxisAlignedBB(player.getX() - range, player.getY() - range, player.getZ() - range, player.getX() + range, player.getY() + range, player.getZ() + range));
|
||||
for(WitherEntity wither : withers)
|
||||
if(!world.isRemote && wither.isAlive() && !(wither instanceof EntityPinkWither)) {
|
||||
wither.remove();
|
||||
EntityPinkWither pink = new EntityPinkWither(world);
|
||||
pink.setLocationAndAngles(wither.posX, wither.posY, wither.posZ, wither.rotationYaw, wither.rotationPitch);
|
||||
pink.setLocationAndAngles(wither.getX(), wither.getY(), wither.getZ(), wither.rotationYaw, wither.rotationPitch);
|
||||
pink.setNoAI(wither.isAIDisabled());
|
||||
if (wither.hasCustomName()) {
|
||||
pink.setCustomName(wither.getCustomName());
|
||||
@@ -61,12 +61,12 @@ public class ItemPinkinator extends ItemMod {
|
||||
world.addEntity(pink);
|
||||
pink.spawnExplosionParticle();
|
||||
pink.playSound(SoundEvents.ENTITY_GENERIC_EXPLODE, 4F, (1F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
UseItemSuccessTrigger.INSTANCE.trigger((ServerPlayerEntity) player, stack, (ServerWorld) world, player.posX, player.posY, player.posZ);
|
||||
UseItemSuccessTrigger.INSTANCE.trigger((ServerPlayerEntity) player, stack, (ServerWorld) world, player.getX(), player.getY(), player.getZ());
|
||||
stack.shrink(1);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.PASS, stack);
|
||||
return ActionResult.pass(stack);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
|
||||
@@ -149,7 +149,7 @@ public class ItemSextant extends ItemMod {
|
||||
reset(world, stack);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
private static double calculateRadius(ItemStack stack, PlayerEntity player) {
|
||||
@@ -181,8 +181,8 @@ public class ItemSextant extends ItemMod {
|
||||
if(onUse == stack && stack.getItem().getUseDuration(stack) - time >= 10) {
|
||||
double radius = calculateRadius(stack, player);
|
||||
FontRenderer font = Minecraft.getInstance().fontRenderer;
|
||||
int x = Minecraft.getInstance().mainWindow.getScaledWidth() / 2 + 30;
|
||||
int y = Minecraft.getInstance().mainWindow.getScaledHeight() / 2;
|
||||
int x = Minecraft.getInstance().getWindow().getScaledWidth() / 2 + 30;
|
||||
int y = Minecraft.getInstance().getWindow().getScaledHeight() / 2;
|
||||
|
||||
String s = Integer.toString((int) radius);
|
||||
boolean inRange = 0 < radius && radius <= MAX_RADIUS;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ItemSlingshot extends ItemMod {
|
||||
ball.shoot(living, living.rotationPitch, living.rotationYaw, 0F, 1.5F, 1F);
|
||||
ball.setMotion(ball.getMotion().scale(1.6));
|
||||
world.addEntity(ball);
|
||||
world.playSound(null, living.posX, living.posY, living.posZ, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F));
|
||||
world.playSound(null, living.getX(), living.getY(), living.getZ(), SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,10 +73,10 @@ public class ItemSlingshot extends ItemMod {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(player.abilities.isCreativeMode || PlayerHelper.hasAmmo(player, AMMO_FUNC)) {
|
||||
player.setActiveHand(hand);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.PASS, stack);
|
||||
return ActionResult.pass(stack);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,8 +45,8 @@ public class ItemTemperanceStone extends ItemMod {
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, @Nonnull Hand hand) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
ItemNBTHelper.setBoolean(stack, TAG_ACTIVE, !ItemNBTHelper.getBoolean(stack, TAG_ACTIVE, false));
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP, SoundCategory.NEUTRAL, 0.3F, 0.1F);
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP, SoundCategory.NEUTRAL, 0.3F, 0.1F);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,11 +41,11 @@ public class ItemThornChakram extends ItemMod {
|
||||
if(stack.getItem() == ModItems.flareChakram)
|
||||
c.setFire(true);
|
||||
world.addEntity(c);
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F));
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F));
|
||||
stack.shrink(1);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class ItemTwigWand extends ItemMod implements ICoordBoundItem {
|
||||
pos.getX(), pos.getY(), pos.getZ()));
|
||||
}
|
||||
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.ding, SoundCategory.PLAYERS, 1F, 1F);
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), ModSounds.ding, SoundCategory.PLAYERS, 1F, 1F);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -294,7 +294,7 @@ public class ItemTwigWand extends ItemMod implements ICoordBoundItem {
|
||||
else player.playSound(ModSounds.ding, 0.1F, 1F);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, stack);
|
||||
return ActionResult.success(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ItemVineBall extends ItemMod {
|
||||
if(!player.abilities.isCreativeMode)
|
||||
player.getHeldItem(hand).shrink(1);
|
||||
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F));
|
||||
world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
if(!world.isRemote) {
|
||||
EntityVineBall ball = new EntityVineBall(player, true);
|
||||
@@ -42,7 +42,7 @@ public class ItemVineBall extends ItemMod {
|
||||
world.addEntity(ball);
|
||||
}
|
||||
|
||||
return ActionResult.newResult(ActionResultType.SUCCESS, player.getHeldItem(hand));
|
||||
return ActionResult.success(player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class ItemVirus extends ItemMod {
|
||||
? EntityType.ZOMBIE_HORSE.create(player.world)
|
||||
: EntityType.SKELETON_HORSE.create(player.world);
|
||||
newHorse.setTamedBy(player);
|
||||
newHorse.setPositionAndRotation(horse.posX, horse.posY, horse.posZ, horse.rotationYaw, horse.rotationPitch);
|
||||
newHorse.setPositionAndRotation(horse.getX(), horse.getY(), horse.getZ(), horse.rotationYaw, horse.rotationPitch);
|
||||
|
||||
// Put the saddle back
|
||||
if(!saddle.isEmpty())
|
||||
|
||||
Loaded 100 of 151 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user