some minor UV work, made transission seals not crashy

This commit is contained in:
Bob 2022-02-03 22:39:27 +01:00
parent e407f33c85
commit 247eaccc90
6 changed files with 26 additions and 19 deletions

View File

@ -49,6 +49,7 @@ public class ItemHolotapeImage extends ItemHoloTape {
HOLO_O_1( EnumChatFormatting.WHITE, "Chroma", "X00-TRANSCRIPT", "[Start of Automated Audio Transcript] <unintelligible> in a boardroom, right, and they're trying to come up with some new ideas. So one guy just says they should reuse this other character from somewhere else, who has like this night-theme you know, and just change the entire schtick to day. So when they had to come up with a name, one guy said, why not take the original name, replace the N with a D, because of night to day, right, and run with it? Now the name sounds like 'Dicks'! Funniest thing I've ever heard! [End of Transcript]"),
HOLO_O_2( EnumChatFormatting.WHITE, "Chroma", "X01-NEWS", "The tape contains a news article, reporting an unusually pale person throwing flashbangs at people in public. The image at the bottom shows one of the incidents, unsurprisingly the light from one of the flashbangs made it unrecognizable."),
HOLO_O_3( EnumChatFormatting.WHITE, "Chroma", "X02-FICTION", "The tape contains an article from a science fiction magazine, engaging with various reader comments about what to do with a time machine. One of those comments suggests engaging in various unsanitary acts with the future self, being signed off with just the initial '~D'."),
HOLO_CHALLENGE( EnumChatFormatting.GRAY, "None", "-", "An empty holotape. The back has the following message scribbled on it with black marker: \"official challenge - convince me that lyons' brotherhood isn't the best brotherhood of steel chapter and win a custom cape!\" The tape smells like chicken nuggets."),
;
private String name;

View File

@ -95,6 +95,8 @@ public class PacketDispatcher {
wrapper.registerMessage(NBTControlPacket.Handler.class, NBTControlPacket.class, i++, Side.SERVER);
//Packet to send for anvil recipes to be crafted
wrapper.registerMessage(AnvilCraftPacket.Handler.class, AnvilCraftPacket.class, i++, Side.SERVER);
//Sends a funi text to display like a music disc announcement
wrapper.registerMessage(TEDoorAnimationPacket.Handler.class, TEDoorAnimationPacket.class, i++, Side.CLIENT);
}
}

View File

@ -11,7 +11,6 @@ import com.hbm.animloader.AnimationWrapper;
import com.hbm.animloader.AnimationWrapper.EndResult;
import com.hbm.animloader.AnimationWrapper.EndType;
import com.hbm.blocks.BlockDummyable;
import com.hbm.main.ResourceManager;
import com.hbm.render.WavefrontObjDisplayList;
import com.hbm.tileentity.DoorDecl;
import com.hbm.tileentity.TileEntityDoorGeneric;
@ -37,7 +36,7 @@ public class RenderDoorGeneric extends TileEntitySpecialRenderer {
if(buf == null){
buf = GLAllocation.createDirectByteBuffer(8*4).asDoubleBuffer();
}
DoorDecl door = te.doorType;
DoorDecl door = te.getDoorType();
GL11.glPushMatrix();
GL11.glTranslated(x+0.5, y, z+0.5);

View File

@ -1,15 +1,12 @@
package com.hbm.tileentity;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.generic.BlockDoorGeneric;
import com.hbm.interfaces.IAnimatedDoor;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.TEDoorAnimationPacket;
import com.hbm.sound.AudioWrapper;
@ -22,15 +19,13 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAnimatedDoor {
//0: closed, 1: open, 2: closing, 3: opening
public byte state = 0;
public DoorDecl doorType;
protected DoorDecl doorType;
public int openTicks = 0;
public long animStartTime = 0;
public int redstonePower;
@ -44,8 +39,8 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
public void updateEntity(){
if(state == 3) {
openTicks++;
if(openTicks >= doorType.timeToOpen()) {
openTicks = doorType.timeToOpen();
if(openTicks >= getDoorType().timeToOpen()) {
openTicks = getDoorType().timeToOpen();
}
} else if(state == 2) {
openTicks--;
@ -57,7 +52,7 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
if(worldObj.isRemote) {
} else {
int[][] ranges = doorType.getDoorOpenRanges();
int[][] ranges = getDoorType().getDoorOpenRanges();
ForgeDirection dir = ForgeDirection.getOrientation(getBlockMetadata() - BlockDummyable.offset);
if(state == 3) {
@ -66,7 +61,7 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
int[] range = ranges[i];
int[] startPos = new int[] {range[0], range[1], range[2]};
float time = doorType.getDoorRangeOpenTime(openTicks, i);
float time = getDoorType().getDoorRangeOpenTime(openTicks, i);
for(int j = 0; j < Math.abs(range[3]); j++) {
@ -101,7 +96,7 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
int[] range = ranges[i];
int[] startPos = new int[] {range[0], range[1], range[2]};
float time = doorType.getDoorRangeOpenTime(openTicks, i);
float time = getDoorType().getDoorRangeOpenTime(openTicks, i);
for(int j = Math.abs(range[3])-1; j >= 0; j--) {
@ -129,7 +124,7 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
}
}
}
if(state == 3 && openTicks == doorType.timeToOpen()) {
if(state == 3 && openTicks == getDoorType().timeToOpen()) {
state = 1;
}
if(state == 2 && openTicks == 0) {
@ -160,24 +155,33 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
}
}
//@Override TODO: figure this one out
public void onLoad(){
doorType = ((BlockDoorGeneric)this.getBlockType()).type;
public DoorDecl getDoorType(){
if(this.doorType == null)
this.doorType = ((BlockDoorGeneric)this.getBlockType()).type;
return this.doorType;
}
public boolean tryToggle(EntityPlayer player){
System.out.println("start");
if(state == 0 && redstonePower > 0){
System.out.println("red power > 0");
//Redstone "power locks" doors, just like minecraft iron doors
return false;
}
if(this.state == 0) {
if(!worldObj.isRemote && canAccess(player)) {
this.state = 3;
System.out.println("opening");
}
return true;
} else if(this.state == 1) {
if(!worldObj.isRemote && canAccess(player)) {
this.state = 2;
System.out.println("closing");
}
return true;
}
@ -231,13 +235,14 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
@Override
@SideOnly(Side.CLIENT)
public void handleNewState(byte state){
if(this.state != state) {
if(this.state == 0 && state == 3){
if(audio == null){
//audio = MainRegistry.proxy.getLoopedSoundStartStop(world, doorType.getOpenSoundLoop(), doorType.getOpenSoundStart(), doorType.getOpenSoundEnd(), SoundCategory.BLOCKS, pos.getX(), pos.getY(), pos.getZ(), doorType.getSoundVolume(), 1);
//audio.startSound();
}
if(audio2 == null && doorType.getSoundLoop2() != null){
if(audio2 == null && getDoorType().getSoundLoop2() != null){
//audio2 = MainRegistry.proxy.getLoopedSoundStartStop(world, doorType.getSoundLoop2(), null, null, SoundCategory.BLOCKS, pos.getX(), pos.getY(), pos.getZ(), doorType.getSoundVolume(), 1);
//audio2.startSound();
}
@ -247,7 +252,7 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
//audio = MainRegistry.proxy.getLoopedSoundStartStop(world, doorType.getCloseSoundLoop(), doorType.getCloseSoundStart(), doorType.getCloseSoundEnd(), SoundCategory.BLOCKS, pos.getX(), pos.getY(), pos.getZ(), doorType.getSoundVolume(), 1);
//audio.startSound();
}
if(audio2 == null && doorType.getSoundLoop2() != null){
if(audio2 == null && getDoorType().getSoundLoop2() != null){
//audio2 = MainRegistry.proxy.getLoopedSoundStartStop(world, doorType.getSoundLoop2(), null, null, SoundCategory.BLOCKS, pos.getX(), pos.getY(), pos.getZ(), doorType.getSoundVolume(), 1);
//audio2.startSound();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B