Skip to content
This repository was archived by the owner on Jun 27, 2022. It is now read-only.

Feature/hydro multiblock #57

Open
wants to merge 49 commits into
base: feature/hydroMultiblock
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b458137
potentially fixed a nullpointerexception with buildcraft facades
praecipitator Apr 13, 2017
86d17d6
version stuff
praecipitator Apr 13, 2017
dd83195
Merge branch 'release/0.4.4'
praecipitator Apr 13, 2017
56153cb
Merge branch 'release/0.4.4' into develop
praecipitator Apr 13, 2017
8838f71
improved the environmental boost of isotope generators, fixes #33
praecipitator Apr 16, 2017
270abc7
began porting motherships to the new system
praecipitator Apr 23, 2017
7641280
fixed mothership data transmission
praecipitator Apr 23, 2017
48276d4
hopefully fixed the crash with orphan moons
praecipitator Apr 24, 2017
4845ad7
version stuff
praecipitator Apr 24, 2017
691345e
Merge branch 'release/0.4.5'
praecipitator Apr 24, 2017
7e8df1c
Merge branch 'release/0.4.5' into develop
praecipitator Apr 24, 2017
8c3c6cc
allowed rockets to be started from motherships
praecipitator May 4, 2017
abe640e
improved the sky rendering
praecipitator May 17, 2017
128bd02
auto-set matchUsersByUUID to false on cracked servers, tried updating…
praecipitator May 20, 2017
8d434fc
upgraded to GC 495
praecipitator May 22, 2017
fc0a861
added a sanity check for mothershipProviderID, should prevent collisions
praecipitator May 22, 2017
620c623
version stuff
praecipitator May 22, 2017
d702f88
Merge branch 'release/0.4.6'
praecipitator May 22, 2017
06ad27a
Merge branch 'release/0.4.6' into develop
praecipitator May 22, 2017
e08bc63
GC 498
praecipitator May 26, 2017
9fe2a80
gravity generator works
praecipitator May 26, 2017
4875715
refactored the gravity generator
praecipitator May 26, 2017
eb18dd3
improved some textures
praecipitator May 26, 2017
e1b4ce6
gravity generator particles
praecipitator May 27, 2017
f14798b
improved the gravity disabling item
praecipitator May 27, 2017
2b74de9
added handling of IAntiGrav
praecipitator May 27, 2017
15a671f
version stuff
praecipitator May 27, 2017
ffcdaf1
Merge branch 'release/0.4.7'
praecipitator May 27, 2017
f4aa2ed
Merge branch 'release/0.4.7' into develop
praecipitator May 27, 2017
ed2242f
shuttle saves dock position
praecipitator Jun 3, 2017
eb5ca94
improved shuttle dismounting
praecipitator Jun 3, 2017
cede0b4
potentially fixed #43, made the mehen belt brighter
praecipitator Jun 12, 2017
b8057d0
began overhauling the permission system
praecipitator Jun 15, 2017
ec68829
permission system fixed. closes #41
praecipitator Jun 21, 2017
07a55a3
version
praecipitator Jun 23, 2017
2f956bc
Merge branch 'release/0.4.8'
praecipitator Jun 23, 2017
3c9d62b
Merge branch 'release/0.4.8' into develop
praecipitator Jun 23, 2017
d56606a
fixed changelog
praecipitator Jun 23, 2017
1d58229
Merge branch 'develop'
praecipitator Jun 23, 2017
d66daf4
upd: changed to new versions of mods (buildcraft, galacticraft)
zetti68 Sep 17, 2017
bc7d8c1
Merge pull request #44 from zetti68/master
praecipitator Nov 25, 2017
0367553
fixed nanotool
praecipitator Nov 25, 2017
6510464
upd: BuildCraft has new version, older release is deleted -> changed
zetti68 Nov 28, 2017
b7e8d09
Merge remote-tracking branch 'origin/develop' into pr/48
Apr 28, 2020
82ff91d
Merge remote-tracking branch 'origin/feature/hydroMultiblock' into pr/48
Apr 28, 2020
5c3a54e
[ImgBot] Optimize images
ImgBotApp May 4, 2020
1570f6a
Merge remote-tracking branch 'origin/imgbot' into pr/48
May 4, 2020
c979160
Merge branch 'master' into feature/hydroMultiblock
May 4, 2020
63b955b
Merge branch 'pr/48' into feature/hydroMultiblock
May 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions amunra_Client.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/amunra"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="GradleStart"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="amunra"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-DFORGE_FORCE_FRAME_RECALC=true"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="D:\Code\amunra\run"/>
</launchConfiguration>
13 changes: 13 additions & 0 deletions amunra_Server.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/amunra"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="GradleStartServer"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="amunra"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-DFORGE_FORCE_FRAME_RECALC=true"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="D:\Code\amunra\run"/>
</launchConfiguration>
26 changes: 14 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ buildscript {
}

repositories {
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven"
Expand All @@ -26,14 +30,13 @@ repositories {
}
}


apply plugin: 'forge'



version = "0.4.3"
group= "de.katzenpapst.amunra" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
version = "0.4.9"
group = "de.katzenpapst.amunra" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "AmunRa-GC"
def gc_version = "3.0.12.502"
def bc_version = "7.1.23"

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -73,14 +76,13 @@ dependencies {
compile ("com.enderio:EnderIO:1.7.10-2.3.0.429_beta:dev" ) {
transitive = false
}
compile "com.mod-buildcraft:buildcraft:6.1.5:api"

compile files("libs/MicdoodleCore-Dev-1.7-3.0.12.476.jar")
compile files("libs/Galacticraft-API-1.7-3.0.12.476.jar")
compile files("libs/GalacticraftCore-Dev-1.7-3.0.12.476.jar")
compile files("libs/Galacticraft-Planets-Dev-1.7-3.0.12.476.jar")

compile name: 'buildcraft', version: "${bc_version}", classifier: "dev", ext: 'jar'

compile files("libs/MicdoodleCore-Dev-1.7-${gc_version}.jar")
compile files("libs/Galacticraft-API-1.7-${gc_version}.jar")
compile files("libs/GalacticraftCore-Dev-1.7-${gc_version}.jar")
compile files("libs/Galacticraft-Planets-Dev-1.7-${gc_version}.jar")

}

dependencies {
Expand Down
32 changes: 32 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
=== 0.4.8 ===
- improved shuttle positioning and dismounting
- potentially fixed a crash with servers like Thermos or KCauldron
- made the mehen belt slightly brighter
- permissions for mothership landing and control are now separate

=== 0.4.7 ===
- minimal GC version is build 498
- made the Artificial Gravity Generator work using the new events
- made an animated texture for the AGG, added particles when it's on
- made an animated texture for dark matter
- the Artificial Gravity Disruptor now has to be enabled (rightclick), and will work from any point in the inventory

=== 0.4.6 ===
- allowed rockets to be started from motherships
- fixed several issue with sky rendering (asteroid fields and rings should render properly now)
- auto-set matchUsersByUUID to false on "offline" servers (Apparently Client and Server get some random UUIDs, which never match when offline)
- tried updating the transit progress bar client-side
- upgraded to GC 495
- added a sanity check for mothershipProviderID, should prevent collisions

=== 0.4.5 ===
- improved the environmental boost of isotope generators, fixes #33
- Upgraded to Galacticraft 1.7-3.0.12.488
- Fixed a bug where mothership data sometimes wouldn't be send to clients
- hopefully fixed the nullpointerexception in sky rendering

=== 0.4.4 ===
- adjusted permission levels of commands
- added two craftable metal chests
- potentially fixed a nullpointerexception with buildcraft facades

== 0.4.3 ==
- updated Galacticraft version to 476
- added permission tab to settings gui: you can now allow everyone, no-one, everyone except blacklisted users, or only whitelisted users to enter the ship. The owner is always allowed.
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/de/katzenpapst/amunra/AmunRa.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class AmunRa
{
public static final String MODID = "GalacticraftAmunRa";
public static final String MODNAME = "Amun-Ra";
public static final String VERSION = "0.4.3";
public static final String VERSION = "0.4.8";

public static ARChannelHandler packetPipeline;

Expand Down Expand Up @@ -169,7 +169,7 @@ public void preInit(FMLPreInitializationEvent event)
ARItems.initItems();
// this works for entityLivingEvent...
MinecraftForge.EVENT_BUS.register(new EventHandlerAR());
// ...but not for onCrafting. Because FUCK YOU, that's why!
// ...but not for onCrafting.
FMLCommonHandler.instance().bus().register(new CraftingHandler());
GameRegistry.registerFuelHandler(new FurnaceHandler());

Expand Down Expand Up @@ -271,8 +271,13 @@ public void postInit(FMLPostInitializationEvent event)

private void doCompatibilityChecks()
{
//
// sanity checks go here
// verify crafting
RecipeHelper.verifyNasaWorkbenchCrafting();

// verify mothership provider ID
config.verifyMothershipProviderId();

}

// stolen from GC....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List
public boolean hasTileEntity(int meta)
{
SubBlock sb = getSubBlock(meta);
if(sb == null) return false;
return sb.hasTileEntity(meta);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,4 +458,12 @@ public boolean canReplace(World world, int x, int y, int z, int probablySide, It
}
return super.canReplace(world, x, y, z, probablySide, stack);
}

@SideOnly(Side.CLIENT)
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random rand)
{
int meta = world.getBlockMetadata(x, y, z);
this.getSubBlock(meta).randomDisplayTick(world, x, y, z, rand);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ public int quantityDropped(Random rand)
@Override
public int damageDropped(int meta)
{
return droppedItems.getDamage();
return droppedItems != null ? droppedItems.getDamage() : super.damageDropped(meta);
}

@Override
public Item getItemDropped(int meta, Random random, int fortune)
{
return droppedItems.getItem();
return droppedItems != null ? droppedItems.getItem() : super.getItemDropped(meta, random, fortune);
}

public SubBlockDropItem setDroppedItem(Item item) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean onMachineActivated(World world, int x, int y, int z, EntityPlayer
{
if(world.provider instanceof MothershipWorldProvider) {

if( ((MothershipWorldProvider)world.provider).isPlayerOwner(entityPlayer) ) {
if( ((MothershipWorldProvider)world.provider).isPlayerUsagePermitted(entityPlayer) ) {
openGui(world, x, y, z, entityPlayer);

return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package de.katzenpapst.amunra.block.machine;

import java.util.Random;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import de.katzenpapst.amunra.AmunRa;
import de.katzenpapst.amunra.GuiIds;
import de.katzenpapst.amunra.block.BlockMachineMeta;
import de.katzenpapst.amunra.block.SubBlockMachine;
import de.katzenpapst.amunra.helper.CoordHelper;
import de.katzenpapst.amunra.proxy.ARSidedProxy.ParticleType;
import de.katzenpapst.amunra.tile.TileEntityGravitation;
import micdoodle8.mods.galacticraft.api.vector.Vector3;
import micdoodle8.mods.galacticraft.core.GalacticraftCore;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
Expand Down Expand Up @@ -59,28 +64,6 @@ public IIcon getIcon(int side, int meta)
return this.backIcon;
}
return this.sideIcon;
/*
ForgeDirection sideDirection = CoordHelper.rotateForgeDirection(ForgeDirection.getOrientation(side), realMeta);


switch(sideDirection) {
case DOWN:
return this.sideIcon;
case EAST:
return this.sideIcon;
case NORTH:
return this.backIcon;
case SOUTH:
return this.blockIcon;
case UP:
return this.sideIcon;
case WEST:
return this.sideIcon;
case UNKNOWN:
default:
return this.sideIcon;
}
*/
}


Expand All @@ -102,4 +85,48 @@ public boolean onMachineActivated(World world, int x, int y, int z, EntityPlayer
return true;
}

@SideOnly(Side.CLIENT)
@Override
public void randomDisplayTick(World par1World, int x, int y, int z, Random rand)
{
boolean test = true;
if (par1World.getTileEntity(x, y, z) instanceof TileEntityGravitation)
{
TileEntityGravitation tile = (TileEntityGravitation)par1World.getTileEntity(x, y, z);
if(tile.isRunning()) {
for (int particleCount = 0; particleCount < 10; particleCount++)
{
double x2 = x + rand.nextFloat();
double y2 = y + rand.nextFloat();
double z2 = z + rand.nextFloat();
double mX = 0.0D;
double mY = 0.0D;
double mZ = 0.0D;
int dir = rand.nextInt(2) * 2 - 1;
mX = 0;//(rand.nextFloat() - 0.5D) * 0.5D;
mY = (rand.nextFloat() - 0.5D) * 0.5D;
mZ = 0;//(rand.nextFloat() - 0.5D) * 0.5D;

final int var2 = par1World.getBlockMetadata(x, y, z);

if (var2 == 3 || var2 == 2)
{
x2 = x + 0.5D + 0.25D * dir;
mX = rand.nextFloat() * 2.0F * dir;
}
else
{
z2 = z + 0.5D + 0.25D * dir;
mZ = rand.nextFloat() * 2.0F * dir;
}

if(test) {
AmunRa.proxy.spawnParticles(ParticleType.PT_GRAVITY_DUST, par1World, new Vector3(x+0.5, y+0.5, z+0.5), new Vector3(mX, tile.getGravityForce(), mZ));
} else {
GalacticraftCore.proxy.spawnParticle("oxygen", new Vector3(x2, y2, z2), new Vector3(mX, mY, mZ), new Object[] { new Vector3(0.7D, 0.7D, 1.0D) });
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import cpw.mods.fml.relauncher.SideOnly;
import de.katzenpapst.amunra.AmunRa;
import de.katzenpapst.amunra.GuiIds;
import de.katzenpapst.amunra.block.SubBlockMachine;
import de.katzenpapst.amunra.block.machine.AbstractBlockMothershipRestricted;
import de.katzenpapst.amunra.vec.Vector3int;
import micdoodle8.mods.galacticraft.core.util.GCCoreUtil;
import de.katzenpapst.amunra.tile.TileEntityMothershipEngineAbstract;
Expand All @@ -17,7 +17,7 @@
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;

public class MothershipEngineBoosterBase extends SubBlockMachine {
public class MothershipEngineBoosterBase extends AbstractBlockMothershipRestricted {

protected String activeTextureName;
protected IIcon activeBlockIcon;
Expand All @@ -42,16 +42,28 @@ public boolean onMachineActivated(World world, int x, int y, int z, EntityPlayer
TileEntityMothershipEngineBooster tile = (TileEntityMothershipEngineBooster)leTile;

if(tile.hasMaster()) {
return super.onMachineActivated(world, x, y, z, entityPlayer, side, hitX, hitY, hitZ);
}
return false;
}



@Override
protected void openGui(World world, int x, int y, int z, EntityPlayer entityPlayer) {
// try this
if(world.isRemote) {
return;
}
TileEntity leTile = world.getTileEntity(x, y, z);
if(leTile != null) {
TileEntityMothershipEngineBooster tile = (TileEntityMothershipEngineBooster)leTile;
Vector3int pos = tile.getMasterPosition();

entityPlayer.openGui(AmunRa.instance, GuiIds.GUI_MS_ROCKET_ENGINE, world, pos.x, pos.y, pos.z);
return true;
}
return false;
}



@Override
public boolean hasTileEntity(int metadata) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import cpw.mods.fml.relauncher.SideOnly;
import de.katzenpapst.amunra.AmunRa;
import de.katzenpapst.amunra.GuiIds;
import de.katzenpapst.amunra.block.SubBlockMachine;
import de.katzenpapst.amunra.block.machine.AbstractBlockMothershipRestricted;
import de.katzenpapst.amunra.item.ItemDamagePair;
import de.katzenpapst.amunra.tile.TileEntityMothershipEngineAbstract;
import micdoodle8.mods.galacticraft.core.util.GCCoreUtil;
Expand All @@ -18,7 +18,7 @@
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

public abstract class MothershipEngineJetBase extends SubBlockMachine {
public abstract class MothershipEngineJetBase extends AbstractBlockMothershipRestricted {

protected String iconTexture;

Expand Down Expand Up @@ -109,13 +109,10 @@ public boolean renderAsNormalBlock()
return false;
}


@Override
public boolean onMachineActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ)
{
// do the isRemote thing here, too?
protected void openGui(World world, int x, int y, int z, EntityPlayer entityPlayer) {
entityPlayer.openGui(AmunRa.instance, GuiIds.GUI_MS_ROCKET_ENGINE, world, x, y, z);
return true;
// return false;
}

@Override
Expand Down
Loading