mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Make ender hand less desyncy and clean some old filesy
This commit is contained in:
1 parent
687d475aeb
commit
878c0dbeba
3 files changed
+9
-159
No files matched your search
@@ -1,102 +0,0 @@
|
||||
/**
|
||||
* This class was created by <wiiv>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [? (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelBlackHoleCube extends ModelBase {
|
||||
public final ModelRenderer shape1;
|
||||
public final ModelRenderer shape1_1;
|
||||
public final ModelRenderer shape1_2;
|
||||
public final ModelRenderer shape1_3;
|
||||
public final ModelRenderer shape1_4;
|
||||
public final ModelRenderer shape1_5;
|
||||
public final ModelRenderer shape1_6;
|
||||
public final ModelRenderer shape1_7;
|
||||
public final ModelRenderer shape1_8;
|
||||
public final ModelRenderer shape1_9;
|
||||
public final ModelRenderer shape1_10;
|
||||
public final ModelRenderer shape1_11;
|
||||
|
||||
public ModelBlackHoleCube() {
|
||||
textureWidth = 36;
|
||||
textureHeight = 2;
|
||||
shape1_3 = new ModelRenderer(this, 0, 0);
|
||||
shape1_3.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_3.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
|
||||
setRotateAngle(shape1_3, 0.0F, 1.5707963267948966F, 0.0F);
|
||||
shape1_7 = new ModelRenderer(this, 0, 0);
|
||||
shape1_7.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_7.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
|
||||
setRotateAngle(shape1_7, 0.0F, 1.5707963267948966F, 0.0F);
|
||||
shape1_9 = new ModelRenderer(this, 0, 0);
|
||||
shape1_9.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_9.addBox(-7.0F, 7.0F, 7.0F, 14, 1, 1, 0.0F);
|
||||
setRotateAngle(shape1_9, 0.0F, 3.141592653589793F, 1.5707963267948966F);
|
||||
shape1_11 = new ModelRenderer(this, 0, 0);
|
||||
shape1_11.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_11.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
|
||||
setRotateAngle(shape1_11, 0.0F, 3.141592653589793F, 1.5707963267948966F);
|
||||
shape1 = new ModelRenderer(this, 0, 0);
|
||||
shape1.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1.addBox(-8.0F, 7.0F, 7.0F, 16, 1, 1, 0.0F);
|
||||
shape1_4 = new ModelRenderer(this, 0, 0);
|
||||
shape1_4.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_4.addBox(-8.0F, 7.0F, -8.0F, 16, 1, 1, 0.0F);
|
||||
shape1_8 = new ModelRenderer(this, 0, 0);
|
||||
shape1_8.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_8.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
|
||||
setRotateAngle(shape1_8, 0.0F, 3.141592653589793F, 1.5707963267948966F);
|
||||
shape1_2 = new ModelRenderer(this, 0, 0);
|
||||
shape1_2.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_2.addBox(-8.0F, -8.0F, -8.0F, 16, 1, 1, 0.0F);
|
||||
shape1_1 = new ModelRenderer(this, 0, 0);
|
||||
shape1_1.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_1.addBox(-8.0F, -8.0F, 7.0F, 16, 1, 1, 0.0F);
|
||||
shape1_6 = new ModelRenderer(this, 0, 0);
|
||||
shape1_6.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_6.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
|
||||
setRotateAngle(shape1_6, 0.0F, -1.5707963267948966F, 0.0F);
|
||||
shape1_10 = new ModelRenderer(this, 0, 0);
|
||||
shape1_10.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_10.addBox(-7.0F, -8.0F, 7.0F, 14, 1, 1, 0.0F);
|
||||
setRotateAngle(shape1_10, 0.0F, 3.141592653589793F, 1.5707963267948966F);
|
||||
shape1_5 = new ModelRenderer(this, 0, 0);
|
||||
shape1_5.setRotationPoint(0.0F, 16.0F, 0.0F);
|
||||
shape1_5.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
|
||||
setRotateAngle(shape1_5, 0.0F, -1.5707963267948966F, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
shape1_3.render(f5);
|
||||
shape1_7.render(f5);
|
||||
shape1_9.render(f5);
|
||||
shape1_11.render(f5);
|
||||
shape1.render(f5);
|
||||
shape1_4.render(f5);
|
||||
shape1_8.render(f5);
|
||||
shape1_2.render(f5);
|
||||
shape1_1.render(f5);
|
||||
shape1_6.render(f5);
|
||||
shape1_10.render(f5);
|
||||
shape1_5.render(f5);
|
||||
}
|
||||
|
||||
|
||||
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Kihira>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [? (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelSkullOverride extends ModelBase {
|
||||
|
||||
private final ModelRenderer bipedHead;
|
||||
private final ModelRenderer bipedHeadwear;
|
||||
|
||||
public ModelSkullOverride() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
bipedHead = new ModelRenderer(this, 0, 0);
|
||||
bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0F);
|
||||
bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
bipedHeadwear = new ModelRenderer(this, 32, 0);
|
||||
bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.5F);
|
||||
bipedHeadwear.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
public void renderWithoutRotation(float par1) {
|
||||
bipedHead.render(par1);
|
||||
bipedHeadwear.render(par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
bipedHead.render(par7);
|
||||
bipedHeadwear.render(par7);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity) {
|
||||
bipedHead.rotateAngleY = bipedHeadwear.rotateAngleY = par4 / (180F / (float)Math.PI);
|
||||
bipedHead.rotateAngleX = bipedHeadwear.rotateAngleX = par5 / (180F / (float)Math.PI);
|
||||
}
|
||||
}
|
||||
@@ -44,20 +44,22 @@ public class ItemEnderHand extends ItemMod implements IManaUsingItem, IBlockProv
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(@Nonnull ItemStack stack, World world, EntityPlayer player, EnumHand hand) {
|
||||
if(ManaItemHandler.requestManaExact(stack, player, COST_SELF, false)) {
|
||||
player.displayGUIChest(player.getInventoryEnderChest());
|
||||
if(!player.worldObj.isRemote)
|
||||
player.displayGUIChest(player.getInventoryEnderChest());
|
||||
ManaItemHandler.requestManaExact(stack, player, COST_SELF, true);
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.PLAYERS, 1F, 1F);
|
||||
player.playSound(SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1F, 1F);
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
return ActionResult.newResult(EnumActionResult.PASS, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer iplayer, EntityLivingBase entity, EnumHand hand) {
|
||||
if(ConfigHandler.enderPickpocketEnabled && entity instanceof EntityPlayer && ManaItemHandler.requestManaExact(stack, iplayer, COST_OTHER, false)) {
|
||||
iplayer.displayGUIChest(((EntityPlayer) entity).getInventoryEnderChest());
|
||||
ManaItemHandler.requestManaExact(stack, iplayer, COST_OTHER, true);
|
||||
entity.playSound(SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1F, 1F);
|
||||
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase entity, EnumHand hand) {
|
||||
if(ConfigHandler.enderPickpocketEnabled && entity instanceof EntityPlayer && ManaItemHandler.requestManaExact(stack, player, COST_OTHER, false)) {
|
||||
if(!player.worldObj.isRemote)
|
||||
player.displayGUIChest(((EntityPlayer) entity).getInventoryEnderChest());
|
||||
ManaItemHandler.requestManaExact(stack, player, COST_OTHER, true);
|
||||
player.playSound(SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1F, 1F);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user